From defab5e9035388c6559e0f591bea6e41569eab18 Mon Sep 17 00:00:00 2001 From: API Team Date: Tue, 3 Feb 2026 09:52:22 +0000 Subject: [PATCH] [GitHub Bot] Generated python SDK --- thousandeyes-sdk-administrative/README.md | 2 +- .../administrative/api/account_groups_api.py | 1 + .../administrative/api/permissions_api.py | 1 + .../administrative/api/roles_api.py | 1 + .../administrative/api/user_events_api.py | 71 + .../administrative/api/users_api.py | 1 + thousandeyes-sdk-agents/README.md | 2 +- .../agents/api/agent_proxies_api.py | 1 + ...enterprise_agent_notification_rules_api.py | 1 + .../api/cloud_and_enterprise_agents_api.py | 1 + .../api/enterprise_agent_cluster_api.py | 1 + .../api/tests_assignment_on_agents_api.py | 1 + thousandeyes-sdk-alerts/README.md | 2 +- .../alerts/api/alert_rules_api.py | 1 + .../api/alert_suppression_windows_api.py | 1 + .../thousandeyes_sdk/alerts/api/alerts_api.py | 74 + thousandeyes-sdk-bgp-monitors/README.md | 2 +- .../bgp_monitors/api/bgp_monitors_api.py | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 66 + .../.openapi-generator/VERSION | 1 + thousandeyes-sdk-connectors/MANIFEST.in | 1 + thousandeyes-sdk-connectors/README.md | 142 ++ .../docs/Assignments.md | 31 + .../docs/AuthenticationType.md | 11 + .../docs/BasicAuthentication.md | 31 + .../docs/BearerTokenAuthentication.md | 30 + .../docs/ConnectorType.md | 11 + thousandeyes-sdk-connectors/docs/Error.md | 33 + .../docs/GenericConnector.md | 35 + .../docs/GenericConnectorAuth.md | 39 + .../docs/GenericConnectors.md | 30 + .../docs/GenericConnectorsApi.md | 539 +++++ thousandeyes-sdk-connectors/docs/Header.md | 30 + thousandeyes-sdk-connectors/docs/Link.md | 37 + .../OauthClientCredentialsAuthentication.md | 33 + .../docs/OauthCodeAuthentication.md | 37 + .../docs/OperationCategory.md | 11 + .../docs/OperationConnectorsApi.md | 166 ++ .../docs/OperationStatus.md | 11 + .../docs/OperationType.md | 11 + .../docs/OtherTokenAuthentication.md | 30 + thousandeyes-sdk-connectors/docs/SelfLinks.md | 30 + .../docs/UnauthorizedError.md | 30 + .../docs/ValidationError.md | 34 + .../docs/ValidationErrorItem.md | 31 + .../docs/WebhookOperation.md | 39 + .../docs/WebhookOperations.md | 30 + .../docs/WebhookOperationsApi.md | 385 +++ thousandeyes-sdk-connectors/pyproject.toml | 82 + thousandeyes-sdk-connectors/setup.cfg | 2 + .../thousandeyes_sdk/connectors/__init__.py | 45 + .../connectors/api/__init__.py | 7 + .../connectors/api/generic_connectors_api.py | 2150 +++++++++++++++++ .../api/operation_connectors_api.py | 688 ++++++ .../connectors/api/webhook_operations_api.py | 1534 ++++++++++++ .../connectors/models/__init__.py | 38 + .../connectors/models/assignments.py | 93 + .../connectors/models/authentication_type.py | 44 + .../connectors/models/basic_authentication.py | 92 + .../models/bearer_token_authentication.py | 90 + .../connectors/models/connector_type.py | 40 + .../connectors/models/error.py | 95 + .../connectors/models/generic_connector.py | 117 + .../models/generic_connector_auth.py | 185 ++ .../connectors/models/generic_connectors.py | 101 + .../connectors/models/header.py | 89 + .../connectors/models/link.py | 101 + ...oauth_client_credentials_authentication.py | 96 + .../models/oauth_code_authentication.py | 104 + .../connectors/models/operation_category.py | 42 + .../connectors/models/operation_status.py | 43 + .../connectors/models/operation_type.py | 40 + .../models/other_token_authentication.py | 90 + .../connectors/models/self_links.py | 91 + .../connectors/models/unauthorized_error.py | 89 + .../connectors/models/validation_error.py | 110 + .../models/validation_error_item.py | 91 + .../connectors/models/webhook_operation.py | 124 + .../connectors/models/webhook_operations.py | 101 + .../src/thousandeyes_sdk/connectors/py.typed | 0 thousandeyes-sdk-connectors/test/__init__.py | 0 .../test/test_generic_connectors_api.py | 282 +++ .../test/test_operation_connectors_api.py | 86 + .../test/test_utils.py | 16 + .../test/test_webhook_operations_api.py | 285 +++ thousandeyes-sdk-credentials/README.md | 2 +- .../credentials/api/credentials_api.py | 1 + thousandeyes-sdk-dashboards/README.md | 2 +- .../dashboards/api/dashboard_snapshots_api.py | 1 + .../dashboards/api/dashboards_api.py | 1 + .../dashboards/api/dashboards_filters_api.py | 1 + thousandeyes-sdk-emulation/README.md | 2 +- .../emulation/api/emulation_api.py | 1 + thousandeyes-sdk-endpoint-agents/README.md | 2 +- .../docs/EndpointAgent.md | 1 + .../api/endpoint_agents_api.py | 147 ++ .../api/endpoint_agents_transfer_api.py | 1 + .../endpoint_agents/models/endpoint_agent.py | 6 +- .../test/test_endpoint_agents_api.py | 8 + .../README.md | 2 +- ...er_endpoint_instant_scheduled_tests_api.py | 1 + ...er_endpoint_instant_scheduled_tests_api.py | 1 + ...un_endpoint_instant_scheduled_tests_api.py | 1 + thousandeyes-sdk-endpoint-labels/README.md | 2 +- .../api/endpoint_agent_labels_api.py | 65 + .../README.md | 2 +- ...ver_endpoint_scheduled_test_results_api.py | 226 ++ ...local_network_endpoint_test_results_api.py | 74 + ...twork_dynamic_endpoint_test_results_api.py | 147 ++ ...ork_endpoint_scheduled_test_results_api.py | 226 ++ .../real_user_endpoint_test_results_api.py | 211 ++ thousandeyes-sdk-endpoint-tests/README.md | 2 +- ...nt_to_server_endpoint_dynamic_tests_api.py | 1 + ..._to_server_endpoint_scheduled_tests_api.py | 1 + .../api/endpoint_scheduled_tests_api.py | 1 + ...ttp_server_endpoint_scheduled_tests_api.py | 1 + thousandeyes-sdk-event-detection/README.md | 2 +- .../event_detection/api/events_api.py | 71 + thousandeyes-sdk-instant-tests/README.md | 2 +- .../api/agent_to_agent_instant_tests_api.py | 1 + .../api/agent_to_server_instant_tests_api.py | 1 + .../api/api_instant_tests_api.py | 1 + .../api/dns_server_instant_tests_api.py | 1 + .../api/dns_trace_instant_tests_api.py | 1 + .../api/dnssec_instant_tests_api.py | 1 + .../api/ftp_server_instant_tests_api.py | 1 + .../api/http_page_load_instant_tests_api.py | 1 + .../api/http_server_instant_tests_api.py | 1 + .../instant_tests/api/instant_tests_api.py | 1 + .../api/sip_server_instant_tests_api.py | 1 + .../api/voice_instant_tests_api.py | 1 + .../api/web_transaction_instant_tests_api.py | 1 + thousandeyes-sdk-internet-insights/README.md | 2 +- ...internet_insights_catalog_providers_api.py | 1 + .../api/internet_insights_outages_api.py | 1 + thousandeyes-sdk-snapshots/README.md | 2 +- .../snapshots/api/test_snapshots_api.py | 1 + thousandeyes-sdk-streaming/README.md | 2 +- .../streaming/api/streaming_api.py | 1 + thousandeyes-sdk-tags/README.md | 2 +- .../tags/api/tag_assignment_api.py | 1 + .../src/thousandeyes_sdk/tags/api/tags_api.py | 1 + thousandeyes-sdk-test-results/README.md | 2 +- .../test_results/api/api_test_results_api.py | 71 + .../api/dns_server_test_results_api.py | 144 ++ .../api/dns_trace_test_results_api.py | 71 + .../api/dnssec_test_results_api.py | 71 + .../api/network_bgp_test_results_api.py | 71 + .../api/network_test_results_api.py | 147 ++ .../api/voice_rtp_server_test_results_api.py | 71 + .../api/voice_sip_server_test_results_api.py | 71 + .../api/web_ftp_server_test_results_api.py | 71 + .../api/web_http_server_test_results_api.py | 74 + .../api/web_page_load_test_results_api.py | 71 + .../api/web_transactions_test_results_api.py | 71 + thousandeyes-sdk-tests/README.md | 2 +- .../tests/api/agent_to_agent_tests_api.py | 1 + .../tests/api/agent_to_server_tests_api.py | 1 + .../tests/api/api_tests_api.py | 1 + .../tests/api/bgp_tests_api.py | 1 + .../tests/api/dns_server_tests_api.py | 1 + .../tests/api/dns_trace_tests_api.py | 1 + .../tests/api/dnssec_tests_api.py | 1 + .../tests/api/ftp_server_tests_api.py | 1 + .../tests/api/http_server_tests_api.py | 1 + .../tests/api/page_load_tests_api.py | 1 + ...path_visualization_interface_groups_api.py | 1 + .../tests/api/sip_server_tests_api.py | 1 + .../thousandeyes_sdk/tests/api/tests_api.py | 1 + .../tests/api/voice_tests_api.py | 1 + .../tests/api/web_transaction_tests_api.py | 1 + thousandeyes-sdk-usage/README.md | 2 +- .../thousandeyes_sdk/usage/api/quotas_api.py | 1 + .../thousandeyes_sdk/usage/api/usage_api.py | 126 + 175 files changed, 11788 insertions(+), 22 deletions(-) create mode 100644 thousandeyes-sdk-connectors/.openapi-generator-ignore create mode 100644 thousandeyes-sdk-connectors/.openapi-generator/FILES create mode 100644 thousandeyes-sdk-connectors/.openapi-generator/VERSION create mode 100644 thousandeyes-sdk-connectors/MANIFEST.in create mode 100644 thousandeyes-sdk-connectors/README.md create mode 100644 thousandeyes-sdk-connectors/docs/Assignments.md create mode 100644 thousandeyes-sdk-connectors/docs/AuthenticationType.md create mode 100644 thousandeyes-sdk-connectors/docs/BasicAuthentication.md create mode 100644 thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md create mode 100644 thousandeyes-sdk-connectors/docs/ConnectorType.md create mode 100644 thousandeyes-sdk-connectors/docs/Error.md create mode 100644 thousandeyes-sdk-connectors/docs/GenericConnector.md create mode 100644 thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md create mode 100644 thousandeyes-sdk-connectors/docs/GenericConnectors.md create mode 100644 thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md create mode 100644 thousandeyes-sdk-connectors/docs/Header.md create mode 100644 thousandeyes-sdk-connectors/docs/Link.md create mode 100644 thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md create mode 100644 thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md create mode 100644 thousandeyes-sdk-connectors/docs/OperationCategory.md create mode 100644 thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md create mode 100644 thousandeyes-sdk-connectors/docs/OperationStatus.md create mode 100644 thousandeyes-sdk-connectors/docs/OperationType.md create mode 100644 thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md create mode 100644 thousandeyes-sdk-connectors/docs/SelfLinks.md create mode 100644 thousandeyes-sdk-connectors/docs/UnauthorizedError.md create mode 100644 thousandeyes-sdk-connectors/docs/ValidationError.md create mode 100644 thousandeyes-sdk-connectors/docs/ValidationErrorItem.md create mode 100644 thousandeyes-sdk-connectors/docs/WebhookOperation.md create mode 100644 thousandeyes-sdk-connectors/docs/WebhookOperations.md create mode 100644 thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md create mode 100644 thousandeyes-sdk-connectors/pyproject.toml create mode 100644 thousandeyes-sdk-connectors/setup.cfg create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py create mode 100644 thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/py.typed create mode 100644 thousandeyes-sdk-connectors/test/__init__.py create mode 100644 thousandeyes-sdk-connectors/test/test_generic_connectors_api.py create mode 100644 thousandeyes-sdk-connectors/test/test_operation_connectors_api.py create mode 100644 thousandeyes-sdk-connectors/test/test_utils.py create mode 100644 thousandeyes-sdk-connectors/test/test_webhook_operations_api.py diff --git a/thousandeyes-sdk-administrative/README.md b/thousandeyes-sdk-administrative/README.md index 76662130..6e5c8c13 100644 --- a/thousandeyes-sdk-administrative/README.md +++ b/thousandeyes-sdk-administrative/README.md @@ -12,7 +12,7 @@ This API provides the following operations to manage your organization: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/account_groups_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/account_groups_api.py index 796fb471..5bce0188 100644 --- a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/account_groups_api.py +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/account_groups_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.administrative.models.expand_account_group_options import from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/permissions_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/permissions_api.py index 92d147d1..d40fca72 100644 --- a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/permissions_api.py +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/permissions_api.py @@ -25,6 +25,7 @@ from thousandeyes_sdk.administrative.models.permissions import Permissions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/roles_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/roles_api.py index cdb8f1b4..f7db155f 100644 --- a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/roles_api.py +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/roles_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.administrative.models.roles import Roles from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/user_events_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/user_events_api.py index ac4ebb5b..ed0e7d52 100644 --- a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/user_events_api.py +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/user_events_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.administrative.models.audit_user_events import AuditUserEv from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,76 @@ class UserEventsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-administrative")) self.api_client = api_client + @validate_call + def get_user_events_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List activity log events + + Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to. + :type use_all_permitted_aids: bool + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_user_events, + lambda data: data.audit_events if data and data.audit_events else [], + aid = aid, use_all_permitted_aids = use_all_permitted_aids, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_user_events( diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/users_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/users_api.py index f4ae1455..f28dae30 100644 --- a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/users_api.py +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/administrative/api/users_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.administrative.models.users import Users from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-agents/README.md b/thousandeyes-sdk-agents/README.md index 333204e3..ac790586 100644 --- a/thousandeyes-sdk-agents/README.md +++ b/thousandeyes-sdk-agents/README.md @@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/agent_proxies_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/agent_proxies_api.py index 6ad77372..fe3951ed 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/agent_proxies_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/agent_proxies_api.py @@ -25,6 +25,7 @@ from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py index 95a67f9c..10573792 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.agents.models.notification_rule_detail import Notification from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py index 826ded60..fca3a1a4 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py @@ -30,6 +30,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py index 5611671f..33d511b1 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/tests_assignment_on_agents_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/tests_assignment_on_agents_api.py index 14dafb77..c7c93048 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/tests_assignment_on_agents_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/tests_assignment_on_agents_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-alerts/README.md b/thousandeyes-sdk-alerts/README.md index 67c77994..c3f3e2b5 100644 --- a/thousandeyes-sdk-alerts/README.md +++ b/thousandeyes-sdk-alerts/README.md @@ -12,7 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py index 5c1af875..5f422c6f 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.alerts.models.rules import Rules from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py index 731b5c06..1f406ebe 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.alerts.models.expand_alert_test_options import ExpandAlert from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py index 2bb61123..70cddc67 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.alerts.models.alerts import Alerts from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -337,6 +338,79 @@ class AlertsApi: + @validate_call + def get_alerts_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List active alerts + + Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. + :type state: State + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_alerts, + lambda data: data.alerts if data and data.alerts else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, max = max, cursor = cursor, state = state, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_alerts( diff --git a/thousandeyes-sdk-bgp-monitors/README.md b/thousandeyes-sdk-bgp-monitors/README.md index 2169c9e3..5e209544 100644 --- a/thousandeyes-sdk-bgp-monitors/README.md +++ b/thousandeyes-sdk-bgp-monitors/README.md @@ -9,7 +9,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/bgp_monitors_api.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/bgp_monitors_api.py index 68f532c1..007f4874 100644 --- a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/bgp_monitors_api.py +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/bgp_monitors_api.py @@ -25,6 +25,7 @@ from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-connectors/.openapi-generator-ignore b/thousandeyes-sdk-connectors/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/thousandeyes-sdk-connectors/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/thousandeyes-sdk-connectors/.openapi-generator/FILES b/thousandeyes-sdk-connectors/.openapi-generator/FILES new file mode 100644 index 00000000..cc4969b3 --- /dev/null +++ b/thousandeyes-sdk-connectors/.openapi-generator/FILES @@ -0,0 +1,66 @@ +.openapi-generator-ignore +MANIFEST.in +README.md +docs/Assignments.md +docs/AuthenticationType.md +docs/BasicAuthentication.md +docs/BearerTokenAuthentication.md +docs/ConnectorType.md +docs/Error.md +docs/GenericConnector.md +docs/GenericConnectorAuth.md +docs/GenericConnectors.md +docs/GenericConnectorsApi.md +docs/Header.md +docs/Link.md +docs/OauthClientCredentialsAuthentication.md +docs/OauthCodeAuthentication.md +docs/OperationCategory.md +docs/OperationConnectorsApi.md +docs/OperationStatus.md +docs/OperationType.md +docs/OtherTokenAuthentication.md +docs/SelfLinks.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorItem.md +docs/WebhookOperation.md +docs/WebhookOperations.md +docs/WebhookOperationsApi.md +pyproject.toml +setup.cfg +src/thousandeyes_sdk/connectors/__init__.py +src/thousandeyes_sdk/connectors/api/__init__.py +src/thousandeyes_sdk/connectors/api/generic_connectors_api.py +src/thousandeyes_sdk/connectors/api/operation_connectors_api.py +src/thousandeyes_sdk/connectors/api/webhook_operations_api.py +src/thousandeyes_sdk/connectors/models/__init__.py +src/thousandeyes_sdk/connectors/models/assignments.py +src/thousandeyes_sdk/connectors/models/authentication_type.py +src/thousandeyes_sdk/connectors/models/basic_authentication.py +src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py +src/thousandeyes_sdk/connectors/models/connector_type.py +src/thousandeyes_sdk/connectors/models/error.py +src/thousandeyes_sdk/connectors/models/generic_connector.py +src/thousandeyes_sdk/connectors/models/generic_connector_auth.py +src/thousandeyes_sdk/connectors/models/generic_connectors.py +src/thousandeyes_sdk/connectors/models/header.py +src/thousandeyes_sdk/connectors/models/link.py +src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py +src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py +src/thousandeyes_sdk/connectors/models/operation_category.py +src/thousandeyes_sdk/connectors/models/operation_status.py +src/thousandeyes_sdk/connectors/models/operation_type.py +src/thousandeyes_sdk/connectors/models/other_token_authentication.py +src/thousandeyes_sdk/connectors/models/self_links.py +src/thousandeyes_sdk/connectors/models/unauthorized_error.py +src/thousandeyes_sdk/connectors/models/validation_error.py +src/thousandeyes_sdk/connectors/models/validation_error_item.py +src/thousandeyes_sdk/connectors/models/webhook_operation.py +src/thousandeyes_sdk/connectors/models/webhook_operations.py +src/thousandeyes_sdk/connectors/py.typed +test/__init__.py +test/test_generic_connectors_api.py +test/test_operation_connectors_api.py +test/test_utils.py +test/test_webhook_operations_api.py diff --git a/thousandeyes-sdk-connectors/.openapi-generator/VERSION b/thousandeyes-sdk-connectors/.openapi-generator/VERSION new file mode 100644 index 00000000..93c8ddab --- /dev/null +++ b/thousandeyes-sdk-connectors/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/thousandeyes-sdk-connectors/MANIFEST.in b/thousandeyes-sdk-connectors/MANIFEST.in new file mode 100644 index 00000000..9a2248f5 --- /dev/null +++ b/thousandeyes-sdk-connectors/MANIFEST.in @@ -0,0 +1 @@ +include docs/* diff --git a/thousandeyes-sdk-connectors/README.md b/thousandeyes-sdk-connectors/README.md new file mode 100644 index 00000000..5f9708bf --- /dev/null +++ b/thousandeyes-sdk-connectors/README.md @@ -0,0 +1,142 @@ +# thousandeyes-sdk-connectors +Manage connectors and operations. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.74 +- Generator version: 7.6.0 +- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator + +## Requirements. + +Python 3.8+ + +## Installation & Usage +### pip install + +Install directly via PyPi: + +```sh +pip install thousandeyes-sdk-connectors +``` +(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-connectors`) + +Then import the package: +```python +import thousandeyes_sdk.connectors +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import thousandeyes_sdk.connectors +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the installation procedure and then run the following: + +```python + +import thousandeyes_sdk.core +import thousandeyes_sdk.connectors +from thousandeyes_sdk.core.exceptions import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector | + aid = 123456 # float | Account ID (optional) + + try: + # Create connector + api_response = api_instance.create_generic_connector(generic_connector, aid=aid) + print("The response of GenericConnectorsApi->create_generic_connector:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GenericConnectorsApi* | [**create_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector +*GenericConnectorsApi* | [**delete_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector +*GenericConnectorsApi* | [**get_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector +*GenericConnectorsApi* | [**get_generic_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors +*GenericConnectorsApi* | [**list_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector +*GenericConnectorsApi* | [**set_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector +*GenericConnectorsApi* | [**update_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector +*OperationConnectorsApi* | [**get_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation +*OperationConnectorsApi* | [**set_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#set_operation_connectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation +*WebhookOperationsApi* | [**create_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#create_webhook_operation) | **POST** /operations/webhooks | Create webhook operation +*WebhookOperationsApi* | [**delete_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#delete_webhook_operation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation +*WebhookOperationsApi* | [**get_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#get_webhook_operation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation +*WebhookOperationsApi* | [**get_webhook_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#get_webhook_operations) | **GET** /operations/webhooks | List webhook operations +*WebhookOperationsApi* | [**update_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#update_webhook_operation) | **PUT** /operations/webhooks/{id} | Update webhook operation + + +## Documentation For Models + + - [Assignments](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Assignments.md) + - [AuthenticationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/AuthenticationType.md) + - [BasicAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BasicAuthentication.md) + - [BearerTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md) + - [ConnectorType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConnectorType.md) + - [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Error.md) + - [GenericConnector](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnector.md) + - [GenericConnectorAuth](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md) + - [GenericConnectors](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectors.md) + - [Header](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Header.md) + - [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Link.md) + - [OauthClientCredentialsAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md) + - [OauthCodeAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md) + - [OperationCategory](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationCategory.md) + - [OperationStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationStatus.md) + - [OperationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationType.md) + - [OtherTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md) + - [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/SelfLinks.md) + - [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/UnauthorizedError.md) + - [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ValidationError.md) + - [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md) + - [WebhookOperation](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperation.md) + - [WebhookOperations](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperations.md) + + + +## Documentation For Authorization + +Endpoints do not require authorization. + + +## Author + +ThousandEyes API Team + + diff --git a/thousandeyes-sdk-connectors/docs/Assignments.md b/thousandeyes-sdk-connectors/docs/Assignments.md new file mode 100644 index 00000000..885fcc61 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Assignments.md @@ -0,0 +1,31 @@ +# Assignments + +A list of assigned items. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | **List[str]** | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.assignments import Assignments + +# TODO update the JSON string below +json = "{}" +# create an instance of Assignments from a JSON string +assignments_instance = Assignments.from_json(json) +# print the JSON string representation of the object +print(Assignments.to_json()) + +# convert the object into a dict +assignments_dict = assignments_instance.to_dict() +# create an instance of Assignments from a dict +assignments_from_dict = Assignments.from_dict(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/thousandeyes-sdk-connectors/docs/AuthenticationType.md b/thousandeyes-sdk-connectors/docs/AuthenticationType.md new file mode 100644 index 00000000..282ee3f8 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/AuthenticationType.md @@ -0,0 +1,11 @@ +# AuthenticationType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/BasicAuthentication.md b/thousandeyes-sdk-connectors/docs/BasicAuthentication.md new file mode 100644 index 00000000..d8a97eb9 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/BasicAuthentication.md @@ -0,0 +1,31 @@ +# BasicAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**password** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicAuthentication from a JSON string +basic_authentication_instance = BasicAuthentication.from_json(json) +# print the JSON string representation of the object +print(BasicAuthentication.to_json()) + +# convert the object into a dict +basic_authentication_dict = basic_authentication_instance.to_dict() +# create an instance of BasicAuthentication from a dict +basic_authentication_from_dict = BasicAuthentication.from_dict(basic_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md b/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md new file mode 100644 index 00000000..dc090376 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md @@ -0,0 +1,30 @@ +# BearerTokenAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of BearerTokenAuthentication from a JSON string +bearer_token_authentication_instance = BearerTokenAuthentication.from_json(json) +# print the JSON string representation of the object +print(BearerTokenAuthentication.to_json()) + +# convert the object into a dict +bearer_token_authentication_dict = bearer_token_authentication_instance.to_dict() +# create an instance of BearerTokenAuthentication from a dict +bearer_token_authentication_from_dict = BearerTokenAuthentication.from_dict(bearer_token_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/ConnectorType.md b/thousandeyes-sdk-connectors/docs/ConnectorType.md new file mode 100644 index 00000000..2c0d566d --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/ConnectorType.md @@ -0,0 +1,11 @@ +# ConnectorType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/Error.md b/thousandeyes-sdk-connectors/docs/Error.md new file mode 100644 index 00000000..30694ef1 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Error.md @@ -0,0 +1,33 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnector.md b/thousandeyes-sdk-connectors/docs/GenericConnector.md new file mode 100644 index 00000000..31ed32ce --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnector.md @@ -0,0 +1,35 @@ +# GenericConnector + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] [readonly] +**type** | [**ConnectorType**](ConnectorType.md) | | +**name** | **str** | | +**target** | **str** | | +**authentication** | [**GenericConnectorAuth**](GenericConnectorAuth.md) | | [optional] +**last_modified_date** | **datetime** | The date when the connector was last modified. | [optional] [readonly] +**headers** | [**List[Header]**](Header.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericConnector from a JSON string +generic_connector_instance = GenericConnector.from_json(json) +# print the JSON string representation of the object +print(GenericConnector.to_json()) + +# convert the object into a dict +generic_connector_dict = generic_connector_instance.to_dict() +# create an instance of GenericConnector from a dict +generic_connector_from_dict = GenericConnector.from_dict(generic_connector_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md b/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md new file mode 100644 index 00000000..e77f7732 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md @@ -0,0 +1,39 @@ +# GenericConnectorAuth + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**password** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | +**token** | **str** | | +**refresh_token** | **str** | | [optional] +**oauth_client_id** | **str** | | +**oauth_auth_url** | **str** | | +**oauth_token_url** | **str** | | +**oauth_client_secret** | **str** | | +**code** | **str** | | +**redirect_uri** | **str** | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericConnectorAuth from a JSON string +generic_connector_auth_instance = GenericConnectorAuth.from_json(json) +# print the JSON string representation of the object +print(GenericConnectorAuth.to_json()) + +# convert the object into a dict +generic_connector_auth_dict = generic_connector_auth_instance.to_dict() +# create an instance of GenericConnectorAuth from a dict +generic_connector_auth_from_dict = GenericConnectorAuth.from_dict(generic_connector_auth_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnectors.md b/thousandeyes-sdk-connectors/docs/GenericConnectors.md new file mode 100644 index 00000000..ba2881ba --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnectors.md @@ -0,0 +1,30 @@ +# GenericConnectors + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[GenericConnector]**](GenericConnector.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors + +# TODO update the JSON string below +json = "{}" +# create an instance of GenericConnectors from a JSON string +generic_connectors_instance = GenericConnectors.from_json(json) +# print the JSON string representation of the object +print(GenericConnectors.to_json()) + +# convert the object into a dict +generic_connectors_dict = generic_connectors_instance.to_dict() +# create an instance of GenericConnectors from a dict +generic_connectors_from_dict = GenericConnectors.from_dict(generic_connectors_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md b/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md new file mode 100644 index 00000000..9fd1e425 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md @@ -0,0 +1,539 @@ +# thousandeyes_sdk.connectors.GenericConnectorsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_generic_connector**](GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector +[**delete_generic_connector**](GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector +[**get_generic_connector**](GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector +[**get_generic_connectors**](GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors +[**list_generic_connector_operations**](GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector +[**set_generic_connector_operations**](GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector +[**update_generic_connector**](GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector + + +# **create_generic_connector** +> GenericConnector create_generic_connector(generic_connector, aid=aid) + +Create connector + +Creates a new connector. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector | + aid = 123456 # float | Account ID (optional) + + try: + # Create connector + api_response = api_instance.create_generic_connector(generic_connector, aid=aid) + print("The response of GenericConnectorsApi->create_generic_connector:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generic_connector** | [**GenericConnector**](GenericConnector.md)| | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**GenericConnector**](GenericConnector.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The created connector. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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_generic_connector** +> delete_generic_connector(id, aid=aid) + +Delete connector + +Deletes the connector specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + aid = 123456 # float | Account ID (optional) + + try: + # Delete connector + api_instance.delete_generic_connector(id, aid=aid) + except Exception as e: + print("Exception when calling GenericConnectorsApi->delete_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **aid** | **float**| Account ID | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### 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 | - | +**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_generic_connector** +> GenericConnector get_generic_connector(id, aid=aid) + +Retrieve connector + +Retrieves details of a connector by its ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + aid = 123456 # float | Account ID (optional) + + try: + # Retrieve connector + api_response = api_instance.get_generic_connector(id, aid=aid) + print("The response of GenericConnectorsApi->get_generic_connector:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->get_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**GenericConnector**](GenericConnector.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Connector details. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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_generic_connectors** +> GenericConnectors get_generic_connectors(aid=aid) + +List connectors + +Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + aid = 123456 # float | Account ID (optional) + + try: + # List connectors + api_response = api_instance.get_generic_connectors(aid=aid) + print("The response of GenericConnectorsApi->get_generic_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->get_generic_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aid** | **float**| Account ID | [optional] + +### Return type + +[**GenericConnectors**](GenericConnectors.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of connectors. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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) + +# **list_generic_connector_operations** +> Assignments list_generic_connector_operations(id, aid=aid) + +List operation IDs assigned to a connector + +Returns a list of operation IDs assigned to a connector. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + aid = 123456 # float | Account ID (optional) + + try: + # List operation IDs assigned to a connector + api_response = api_instance.list_generic_connector_operations(id, aid=aid) + print("The response of GenericConnectorsApi->list_generic_connector_operations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->list_generic_connector_operations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of assigned operation IDs. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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) + +# **set_generic_connector_operations** +> Assignments set_generic_connector_operations(id, request_body, aid=aid) + +Assign operations to a connector + +Assigns operations to a connector. This replaces any existing assignments. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"] # List[str] | List of operation IDs to assign to the connector. + aid = 123456 # float | Account ID (optional) + + try: + # Assign operations to a connector + api_response = api_instance.set_generic_connector_operations(id, request_body, aid=aid) + print("The response of GenericConnectorsApi->set_generic_connector_operations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->set_generic_connector_operations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **request_body** | [**List[str]**](str.md)| List of operation IDs to assign to the connector. | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Operations assigned successfully. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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_generic_connector** +> GenericConnector update_generic_connector(id, generic_connector, aid=aid) + +Update connector + +Updates the connector specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.GenericConnectorsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID. + generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector | + aid = 123456 # float | Account ID (optional) + + try: + # Update connector + api_response = api_instance.update_generic_connector(id, generic_connector, aid=aid) + print("The response of GenericConnectorsApi->update_generic_connector:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GenericConnectorsApi->update_generic_connector: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The connector ID. | + **generic_connector** | [**GenericConnector**](GenericConnector.md)| | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**GenericConnector**](GenericConnector.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated connector. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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/thousandeyes-sdk-connectors/docs/Header.md b/thousandeyes-sdk-connectors/docs/Header.md new file mode 100644 index 00000000..7041fe2f --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Header.md @@ -0,0 +1,30 @@ +# Header + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | The value of the header. Note that this value is obfuscated in the response, even when overwritten. | + +## Example + +```python +from thousandeyes_sdk.connectors.models.header import Header + +# TODO update the JSON string below +json = "{}" +# create an instance of Header from a JSON string +header_instance = Header.from_json(json) +# print the JSON string representation of the object +print(Header.to_json()) + +# convert the object into a dict +header_dict = header_instance.to_dict() +# create an instance of Header from a dict +header_from_dict = Header.from_dict(header_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/Link.md b/thousandeyes-sdk-connectors/docs/Link.md new file mode 100644 index 00000000..d094966b --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/Link.md @@ -0,0 +1,37 @@ +# Link + +A hyperlink from the containing resource to a URI. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. | +**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional] +**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional] +**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional] +**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional] +**profile** | **str** | A URI that hints about the profile of the target resource. | [optional] +**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional] +**hreflang** | **str** | Indicates the language of the target resource | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.link import Link + +# TODO update the JSON string below +json = "{}" +# create an instance of Link from a JSON string +link_instance = Link.from_json(json) +# print the JSON string representation of the object +print(Link.to_json()) + +# convert the object into a dict +link_dict = link_instance.to_dict() +# create an instance of Link from a dict +link_from_dict = Link.from_dict(link_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md b/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md new file mode 100644 index 00000000..d112fd9c --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md @@ -0,0 +1,33 @@ +# OauthClientCredentialsAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | [optional] +**oauth_client_id** | **str** | | +**oauth_token_url** | **str** | | +**oauth_client_secret** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of OauthClientCredentialsAuthentication from a JSON string +oauth_client_credentials_authentication_instance = OauthClientCredentialsAuthentication.from_json(json) +# print the JSON string representation of the object +print(OauthClientCredentialsAuthentication.to_json()) + +# convert the object into a dict +oauth_client_credentials_authentication_dict = oauth_client_credentials_authentication_instance.to_dict() +# create an instance of OauthClientCredentialsAuthentication from a dict +oauth_client_credentials_authentication_from_dict = OauthClientCredentialsAuthentication.from_dict(oauth_client_credentials_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md b/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md new file mode 100644 index 00000000..dbff687d --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md @@ -0,0 +1,37 @@ +# OauthCodeAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | [optional] +**refresh_token** | **str** | | [optional] +**oauth_client_id** | **str** | | +**oauth_auth_url** | **str** | | +**oauth_token_url** | **str** | | +**oauth_client_secret** | **str** | | +**code** | **str** | | +**redirect_uri** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of OauthCodeAuthentication from a JSON string +oauth_code_authentication_instance = OauthCodeAuthentication.from_json(json) +# print the JSON string representation of the object +print(OauthCodeAuthentication.to_json()) + +# convert the object into a dict +oauth_code_authentication_dict = oauth_code_authentication_instance.to_dict() +# create an instance of OauthCodeAuthentication from a dict +oauth_code_authentication_from_dict = OauthCodeAuthentication.from_dict(oauth_code_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OperationCategory.md b/thousandeyes-sdk-connectors/docs/OperationCategory.md new file mode 100644 index 00000000..fd4c520c --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationCategory.md @@ -0,0 +1,11 @@ +# OperationCategory + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md b/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md new file mode 100644 index 00000000..70f58033 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md @@ -0,0 +1,166 @@ +# thousandeyes_sdk.connectors.OperationConnectorsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_operation_connectors**](OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation +[**set_operation_connectors**](OperationConnectorsApi.md#set_operation_connectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation + + +# **get_operation_connectors** +> Assignments get_operation_connectors(type, id, aid=aid) + +Retrieve connectors assigned to an operation + +Returns a list of connectors assigned to a specific operation. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.OperationConnectorsApi(api_client) + type = 'webhooks' # str | The operation type. + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + aid = 123456 # float | Account ID (optional) + + try: + # Retrieve connectors assigned to an operation + api_response = api_instance.get_operation_connectors(type, id, aid=aid) + print("The response of OperationConnectorsApi->get_operation_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OperationConnectorsApi->get_operation_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| The operation type. | + **id** | **str**| The operation ID. | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**404** | Not found | - | +**200** | A list of assigned connectors. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_operation_connectors** +> Assignments set_operation_connectors(type, id, request_body, aid=aid) + +Assign connectors to an operation + +Assigns one or more connectors to an operation. This replaces any existing assignments. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.OperationConnectorsApi(api_client) + type = 'webhooks' # str | The operation type. + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"] # List[str] | List of connector IDs to assign to the operation. + aid = 123456 # float | Account ID (optional) + + try: + # Assign connectors to an operation + api_response = api_instance.set_operation_connectors(type, id, request_body, aid=aid) + print("The response of OperationConnectorsApi->set_operation_connectors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OperationConnectorsApi->set_operation_connectors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| The operation type. | + **id** | **str**| The operation ID. | + **request_body** | [**List[str]**](str.md)| List of connector IDs to assign to the operation. | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**Assignments**](Assignments.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**404** | Not found | - | +**200** | Operation Connectors updated successfully. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/thousandeyes-sdk-connectors/docs/OperationStatus.md b/thousandeyes-sdk-connectors/docs/OperationStatus.md new file mode 100644 index 00000000..c18c93d0 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationStatus.md @@ -0,0 +1,11 @@ +# OperationStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OperationType.md b/thousandeyes-sdk-connectors/docs/OperationType.md new file mode 100644 index 00000000..8ad96b35 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OperationType.md @@ -0,0 +1,11 @@ +# OperationType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md b/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md new file mode 100644 index 00000000..902256cb --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md @@ -0,0 +1,30 @@ +# OtherTokenAuthentication + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | +**type** | [**AuthenticationType**](AuthenticationType.md) | | + +## Example + +```python +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication + +# TODO update the JSON string below +json = "{}" +# create an instance of OtherTokenAuthentication from a JSON string +other_token_authentication_instance = OtherTokenAuthentication.from_json(json) +# print the JSON string representation of the object +print(OtherTokenAuthentication.to_json()) + +# convert the object into a dict +other_token_authentication_dict = other_token_authentication_instance.to_dict() +# create an instance of OtherTokenAuthentication from a dict +other_token_authentication_from_dict = OtherTokenAuthentication.from_dict(other_token_authentication_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/SelfLinks.md b/thousandeyes-sdk-connectors/docs/SelfLinks.md new file mode 100644 index 00000000..cdf7fd8c --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/SelfLinks.md @@ -0,0 +1,30 @@ +# SelfLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.self_links import SelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinks from a JSON string +self_links_instance = SelfLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinks.to_json()) + +# convert the object into a dict +self_links_dict = self_links_instance.to_dict() +# create an instance of SelfLinks from a dict +self_links_from_dict = SelfLinks.from_dict(self_links_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/UnauthorizedError.md b/thousandeyes-sdk-connectors/docs/UnauthorizedError.md new file mode 100644 index 00000000..cc560259 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/ValidationError.md b/thousandeyes-sdk-connectors/docs/ValidationError.md new file mode 100644 index 00000000..ae1b252d --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/ValidationError.md @@ -0,0 +1,34 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] +**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md b/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md new file mode 100644 index 00000000..25f5a1e6 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md @@ -0,0 +1,31 @@ +# ValidationErrorItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorItem from a JSON string +validation_error_item_instance = ValidationErrorItem.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorItem.to_json()) + +# convert the object into a dict +validation_error_item_dict = validation_error_item_instance.to_dict() +# create an instance of ValidationErrorItem from a dict +validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/WebhookOperation.md b/thousandeyes-sdk-connectors/docs/WebhookOperation.md new file mode 100644 index 00000000..4ec1df44 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/WebhookOperation.md @@ -0,0 +1,39 @@ +# WebhookOperation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] [readonly] +**name** | **str** | | +**enabled** | **bool** | | [optional] +**category** | [**OperationCategory**](OperationCategory.md) | | +**status** | [**OperationStatus**](OperationStatus.md) | | +**path** | **str** | | [optional] +**payload** | **str** | Handlebars template for the payload. | [optional] +**headers** | [**List[Header]**](Header.md) | | [optional] +**var_query_params** | **str** | Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value. | [optional] +**type** | [**OperationType**](OperationType.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookOperation from a JSON string +webhook_operation_instance = WebhookOperation.from_json(json) +# print the JSON string representation of the object +print(WebhookOperation.to_json()) + +# convert the object into a dict +webhook_operation_dict = webhook_operation_instance.to_dict() +# create an instance of WebhookOperation from a dict +webhook_operation_from_dict = WebhookOperation.from_dict(webhook_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/thousandeyes-sdk-connectors/docs/WebhookOperations.md b/thousandeyes-sdk-connectors/docs/WebhookOperations.md new file mode 100644 index 00000000..4da048f4 --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/WebhookOperations.md @@ -0,0 +1,30 @@ +# WebhookOperations + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[WebhookOperation]**](WebhookOperation.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookOperations from a JSON string +webhook_operations_instance = WebhookOperations.from_json(json) +# print the JSON string representation of the object +print(WebhookOperations.to_json()) + +# convert the object into a dict +webhook_operations_dict = webhook_operations_instance.to_dict() +# create an instance of WebhookOperations from a dict +webhook_operations_from_dict = WebhookOperations.from_dict(webhook_operations_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md b/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md new file mode 100644 index 00000000..de952eaf --- /dev/null +++ b/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md @@ -0,0 +1,385 @@ +# thousandeyes_sdk.connectors.WebhookOperationsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_webhook_operation**](WebhookOperationsApi.md#create_webhook_operation) | **POST** /operations/webhooks | Create webhook operation +[**delete_webhook_operation**](WebhookOperationsApi.md#delete_webhook_operation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation +[**get_webhook_operation**](WebhookOperationsApi.md#get_webhook_operation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation +[**get_webhook_operations**](WebhookOperationsApi.md#get_webhook_operations) | **GET** /operations/webhooks | List webhook operations +[**update_webhook_operation**](WebhookOperationsApi.md#update_webhook_operation) | **PUT** /operations/webhooks/{id} | Update webhook operation + + +# **create_webhook_operation** +> WebhookOperation create_webhook_operation(webhook_operation, aid=aid) + +Create webhook operation + +Creates a new webhook operation. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + webhook_operation = thousandeyes_sdk.connectors.WebhookOperation() # WebhookOperation | + aid = 123456 # float | Account ID (optional) + + try: + # Create webhook operation + api_response = api_instance.create_webhook_operation(webhook_operation, aid=aid) + print("The response of WebhookOperationsApi->create_webhook_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->create_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_operation** | [**WebhookOperation**](WebhookOperation.md)| | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The created webhook operation. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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_webhook_operation** +> delete_webhook_operation(id, aid=aid) + +Delete webhook operation + +Deletes the webhook operation specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + aid = 123456 # float | Account ID (optional) + + try: + # Delete webhook operation + api_instance.delete_webhook_operation(id, aid=aid) + except Exception as e: + print("Exception when calling WebhookOperationsApi->delete_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The operation ID. | + **aid** | **float**| Account ID | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### 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 | - | +**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_webhook_operation** +> WebhookOperation get_webhook_operation(id, aid=aid) + +Retrieve webhook operation + +Retrieves details of a webhook operation by its ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + aid = 123456 # float | Account ID (optional) + + try: + # Retrieve webhook operation + api_response = api_instance.get_webhook_operation(id, aid=aid) + print("The response of WebhookOperationsApi->get_webhook_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->get_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The operation ID. | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Webhook operation with the given id. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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_webhook_operations** +> WebhookOperations get_webhook_operations(aid=aid) + +List webhook operations + +Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + aid = 123456 # float | Account ID (optional) + + try: + # List webhook operations + api_response = api_instance.get_webhook_operations(aid=aid) + print("The response of WebhookOperationsApi->get_webhook_operations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->get_webhook_operations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aid** | **float**| Account ID | [optional] + +### Return type + +[**WebhookOperations**](WebhookOperations.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of webhook operations. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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_webhook_operation** +> WebhookOperation update_webhook_operation(id, webhook_operation, aid=aid) + +Update webhook operation + +Updates the webhook operation specified by ID. + +### Example + + +```python +import thousandeyes_sdk.connectors +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.connectors.WebhookOperationsApi(api_client) + id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID. + webhook_operation = thousandeyes_sdk.connectors.WebhookOperation() # WebhookOperation | + aid = 123456 # float | Account ID (optional) + + try: + # Update webhook operation + api_response = api_instance.update_webhook_operation(id, webhook_operation, aid=aid) + print("The response of WebhookOperationsApi->update_webhook_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhookOperationsApi->update_webhook_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The operation ID. | + **webhook_operation** | [**WebhookOperation**](WebhookOperation.md)| | + **aid** | **float**| Account ID | [optional] + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated webhook operation. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**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/thousandeyes-sdk-connectors/pyproject.toml b/thousandeyes-sdk-connectors/pyproject.toml new file mode 100644 index 00000000..c06761cc --- /dev/null +++ b/thousandeyes-sdk-connectors/pyproject.toml @@ -0,0 +1,82 @@ +[project] +name = "thousandeyes-sdk-connectors" +dynamic = ["version"] +readme = "README.md" +authors = [ + { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } +] +description = "ThousandEyes SDK Integrations API" +license = { file = "LICENSE" } +requires-python = ">= 3.8" +dependencies = [ + "urllib3 >= 2.0.0", + "python-dateutil >=2.8.2", + "pydantic >=2.1.0", + "typing-extensions >=4.7.1", + "thousandeyes-sdk-core", +] + +[tool.setuptools.dynamic] +version = {file = ".version"} + +[project.optional-dependencies] +test = [ + "pytest~=7.1.3", + "pytest-cov>=2.8.1", + "pytest-randomly>=3.12.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] +dev = [ + "flake8>=4.0.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "src", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/thousandeyes-sdk-connectors/setup.cfg b/thousandeyes-sdk-connectors/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/thousandeyes-sdk-connectors/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py new file mode 100644 index 00000000..d6f978e4 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/__init__.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import apis into sdk package +from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi +from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi +from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi + + +# import models into sdk package +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication +from thousandeyes_sdk.connectors.models.connector_type import ConnectorType +from thousandeyes_sdk.connectors.models.error import Error +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors +from thousandeyes_sdk.connectors.models.header import Header +from thousandeyes_sdk.connectors.models.link import Link +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication +from thousandeyes_sdk.connectors.models.operation_category import OperationCategory +from thousandeyes_sdk.connectors.models.operation_status import OperationStatus +from thousandeyes_sdk.connectors.models.operation_type import OperationType +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.connectors.models.validation_error import ValidationError +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py new file mode 100644 index 00000000..929e0ab8 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa + +# import apis into api package +from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi +from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi +from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py new file mode 100644 index 00000000..36c8bd8a --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/generic_connectors_api.py @@ -0,0 +1,2150 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 importlib.metadata import version + +import thousandeyes_sdk.connectors.models + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import List, Optional, Union +from typing_extensions import Annotated +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse + +from thousandeyes_sdk.core.rest import RESTResponseType + + +class GenericConnectorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-connectors")) + self.api_client = api_client + + + @validate_call + def create_generic_connector( + self, + generic_connector: GenericConnector, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnector: + """Create connector + + Creates a new connector. + + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_serialize( + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def create_generic_connector_with_http_info( + self, + generic_connector: GenericConnector, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[GenericConnector]: + """Create connector + + Creates a new connector. + + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_serialize( + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def create_generic_connector_without_preload_content( + self, + generic_connector: GenericConnector, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connector + + Creates a new connector. + + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_serialize( + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_generic_connector_serialize( + self, + generic_connector, + 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 generic_connector is not None: + _body_params = generic_connector + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/connectors/generic', + 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_generic_connector( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connector + + Deletes the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_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", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def delete_generic_connector_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connector + + Deletes the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_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", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def delete_generic_connector_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connector + + Deletes the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_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", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_generic_connector_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/connectors/generic/{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_generic_connector( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnector: + """Retrieve connector + + Retrieves details of a connector by its ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connector_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': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_generic_connector_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[GenericConnector]: + """Retrieve connector + + Retrieves details of a connector by its ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connector_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': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_generic_connector_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connector + + Retrieves details of a connector by its ID. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connector_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': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_generic_connector_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/connectors/generic/{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_generic_connectors( + self, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnectors: + """List connectors + + Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connectors_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': "GenericConnectors", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_generic_connectors_with_http_info( + self, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[GenericConnectors]: + """List connectors + + Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connectors_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': "GenericConnectors", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_generic_connectors_without_preload_content( + self, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connectors + + Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_generic_connectors_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': "GenericConnectors", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_generic_connectors_serialize( + self, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/connectors/generic', + 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 list_generic_connector_operations( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """List operation IDs assigned to a connector + + Returns a list of operation IDs assigned to a connector. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_generic_connector_operations_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': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def list_generic_connector_operations_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[Assignments]: + """List operation IDs assigned to a connector + + Returns a list of operation IDs assigned to a connector. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_generic_connector_operations_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': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def list_generic_connector_operations_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 operation IDs assigned to a connector + + Returns a list of operation IDs assigned to a connector. + + :param id: The connector ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_generic_connector_operations_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': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_generic_connector_operations_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/connectors/generic/{id}/operations', + 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 set_generic_connector_operations( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + request_body: Annotated[List[StrictStr], Field(description="List of operation IDs to assign to the connector.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """Assign operations to a connector + + Assigns operations to a connector. This replaces any existing assignments. + + :param id: The connector ID. (required) + :type id: str + :param request_body: List of operation IDs to assign to the connector. (required) + :type request_body: List[str] + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_generic_connector_operations_serialize( + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def set_generic_connector_operations_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + request_body: Annotated[List[StrictStr], Field(description="List of operation IDs to assign to the connector.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[Assignments]: + """Assign operations to a connector + + Assigns operations to a connector. This replaces any existing assignments. + + :param id: The connector ID. (required) + :type id: str + :param request_body: List of operation IDs to assign to the connector. (required) + :type request_body: List[str] + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_generic_connector_operations_serialize( + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def set_generic_connector_operations_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + request_body: Annotated[List[StrictStr], Field(description="List of operation IDs to assign to the connector.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 operations to a connector + + Assigns operations to a connector. This replaces any existing assignments. + + :param id: The connector ID. (required) + :type id: str + :param request_body: List of operation IDs to assign to the connector. (required) + :type request_body: List[str] + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_generic_connector_operations_serialize( + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_generic_connector_operations_serialize( + self, + id, + request_body, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'request_body': '', + } + + _path_params: Dict[str, 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 request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/connectors/generic/{id}/operations', + 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_generic_connector( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + generic_connector: GenericConnector, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GenericConnector: + """Update connector + + Updates the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_serialize( + id=id, + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def update_generic_connector_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + generic_connector: GenericConnector, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[GenericConnector]: + """Update connector + + Updates the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_serialize( + id=id, + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def update_generic_connector_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The connector ID.")], + generic_connector: GenericConnector, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connector + + Updates the connector specified by ID. + + :param id: The connector ID. (required) + :type id: str + :param generic_connector: (required) + :type generic_connector: GenericConnector + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_generic_connector_serialize( + id=id, + generic_connector=generic_connector, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GenericConnector", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_generic_connector_serialize( + self, + id, + generic_connector, + 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 generic_connector is not None: + _body_params = generic_connector + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/connectors/generic/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py new file mode 100644 index 00000000..3acf7299 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/operation_connectors_api.py @@ -0,0 +1,688 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 importlib.metadata import version + +import thousandeyes_sdk.connectors.models + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import List, Optional, Union +from typing_extensions import Annotated +from thousandeyes_sdk.connectors.models.assignments import Assignments + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse + +from thousandeyes_sdk.core.rest import RESTResponseType + + +class OperationConnectorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-connectors")) + self.api_client = api_client + + + @validate_call + def get_operation_connectors( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """Retrieve connectors assigned to an operation + + Returns a list of connectors assigned to a specific operation. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_operation_connectors_serialize( + type=type, + 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]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_operation_connectors_with_http_info( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[Assignments]: + """Retrieve connectors assigned to an operation + + Returns a list of connectors assigned to a specific operation. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_operation_connectors_serialize( + type=type, + 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]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_operation_connectors_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connectors assigned to an operation + + Returns a list of connectors assigned to a specific operation. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_operation_connectors_serialize( + type=type, + 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]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_operation_connectors_serialize( + self, + type, + 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 type is not None: + _path_params['type'] = type + 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/hal+json', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/operations/{type}/{id}/connectors', + 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 set_operation_connectors( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assignments: + """Assign connectors to an operation + + Assigns one or more connectors to an operation. This replaces any existing assignments. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param request_body: List of connector IDs to assign to the operation. (required) + :type request_body: List[str] + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_operation_connectors_serialize( + type=type, + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def set_operation_connectors_with_http_info( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[Assignments]: + """Assign connectors to an operation + + Assigns one or more connectors to an operation. This replaces any existing assignments. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param request_body: List of connector IDs to assign to the operation. (required) + :type request_body: List[str] + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_operation_connectors_serialize( + type=type, + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def set_operation_connectors_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="The operation type.")], + id: Annotated[StrictStr, Field(description="The operation ID.")], + request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 connectors to an operation + + Assigns one or more connectors to an operation. This replaces any existing assignments. + + :param type: The operation type. (required) + :type type: str + :param id: The operation ID. (required) + :type id: str + :param request_body: List of connector IDs to assign to the operation. (required) + :type request_body: List[str] + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_operation_connectors_serialize( + type=type, + id=id, + request_body=request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '404': "Error", + '200': "Assignments", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_operation_connectors_serialize( + self, + type, + id, + request_body, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'request_body': '', + } + + _path_params: Dict[str, 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 type is not None: + _path_params['type'] = type + 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 request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/problem+json', + 'application/hal+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] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/operations/{type}/{id}/connectors', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py new file mode 100644 index 00000000..76aefd93 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/api/webhook_operations_api.py @@ -0,0 +1,1534 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 importlib.metadata import version + +import thousandeyes_sdk.connectors.models + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import Optional, Union +from typing_extensions import Annotated +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse + +from thousandeyes_sdk.core.rest import RESTResponseType + + +class WebhookOperationsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-connectors")) + self.api_client = api_client + + + @validate_call + def create_webhook_operation( + self, + webhook_operation: WebhookOperation, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperation: + """Create webhook operation + + Creates a new webhook operation. + + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_serialize( + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def create_webhook_operation_with_http_info( + self, + webhook_operation: WebhookOperation, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[WebhookOperation]: + """Create webhook operation + + Creates a new webhook operation. + + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_serialize( + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def create_webhook_operation_without_preload_content( + self, + webhook_operation: WebhookOperation, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operation + + Creates a new webhook operation. + + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_serialize( + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_webhook_operation_serialize( + self, + webhook_operation, + 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 webhook_operation is not None: + _body_params = webhook_operation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/operations/webhooks', + 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_webhook_operation( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operation + + Deletes the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_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", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def delete_webhook_operation_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operation + + Deletes the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_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", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def delete_webhook_operation_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operation + + Deletes the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_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", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_webhook_operation_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/operations/webhooks/{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_webhook_operation( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperation: + """Retrieve webhook operation + + Retrieves details of a webhook operation by its ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operation_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': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_webhook_operation_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[WebhookOperation]: + """Retrieve webhook operation + + Retrieves details of a webhook operation by its ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operation_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': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_webhook_operation_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operation + + Retrieves details of a webhook operation by its ID. + + :param id: The operation ID. (required) + :type id: str + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operation_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': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_operation_serialize( + self, + id, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/operations/webhooks/{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_webhook_operations( + self, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperations: + """List webhook operations + + Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operations_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': "WebhookOperations", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def get_webhook_operations_with_http_info( + self, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[WebhookOperations]: + """List webhook operations + + Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operations_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': "WebhookOperations", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def get_webhook_operations_without_preload_content( + self, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operations + + Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_webhook_operations_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': "WebhookOperations", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_webhook_operations_serialize( + self, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/operations/webhooks', + 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_webhook_operation( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + webhook_operation: WebhookOperation, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookOperation: + """Update webhook operation + + Updates the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_serialize( + id=id, + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ).data + + + @validate_call + def update_webhook_operation_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + webhook_operation: WebhookOperation, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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[WebhookOperation]: + """Update webhook operation + + Updates the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_serialize( + id=id, + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.connectors.models, + ) + + + @validate_call + def update_webhook_operation_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The operation ID.")], + webhook_operation: WebhookOperation, + aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[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 webhook operation + + Updates the webhook operation specified by ID. + + :param id: The operation ID. (required) + :type id: str + :param webhook_operation: (required) + :type webhook_operation: WebhookOperation + :param aid: Account ID + :type aid: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores 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_webhook_operation_serialize( + id=id, + webhook_operation=webhook_operation, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookOperation", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_webhook_operation_serialize( + self, + id, + webhook_operation, + 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 webhook_operation is not None: + _body_params = webhook_operation + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/operations/webhooks/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py new file mode 100644 index 00000000..aefaf6f9 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/__init__.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +# flake8: noqa +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from thousandeyes_sdk.connectors.models.assignments import Assignments +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication +from thousandeyes_sdk.connectors.models.connector_type import ConnectorType +from thousandeyes_sdk.connectors.models.error import Error +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth +from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors +from thousandeyes_sdk.connectors.models.header import Header +from thousandeyes_sdk.connectors.models.link import Link +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication +from thousandeyes_sdk.connectors.models.operation_category import OperationCategory +from thousandeyes_sdk.connectors.models.operation_status import OperationStatus +from thousandeyes_sdk.connectors.models.operation_type import OperationType +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.connectors.models.validation_error import ValidationError +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py new file mode 100644 index 00000000..d58ed65b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/assignments.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class Assignments(BaseModel): + """ + A list of assigned items. + """ # noqa: E501 + items: Optional[List[StrictStr]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["items", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Assignments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 Assignments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": obj.get("items"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py new file mode 100644 index 00000000..d4b21d60 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/authentication_type.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 AuthenticationType(str, Enum): + """ + AuthenticationType + """ + + """ + allowed enum values + """ + BASIC = 'basic' + BEARER_MINUS_TOKEN = 'bearer-token' + OAUTH_MINUS_AUTH_MINUS_CODE = 'oauth-auth-code' + OAUTH_MINUS_CLIENT_MINUS_CREDENTIALS = 'oauth-client-credentials' + OTHER_MINUS_TOKEN = 'other-token' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AuthenticationType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py new file mode 100644 index 00000000..bf8c4ee7 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/basic_authentication.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do 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 +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class BasicAuthentication(BaseModel): + """ + BasicAuthentication + """ # noqa: E501 + username: StrictStr + password: StrictStr + type: AuthenticationType + __properties: ClassVar[List[str]] = ["username", "password", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BasicAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other 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 BasicAuthentication 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"), + "password": obj.get("password"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py new file mode 100644 index 00000000..2c78357a --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do 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 +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class BearerTokenAuthentication(BaseModel): + """ + BearerTokenAuthentication + """ # noqa: E501 + token: StrictStr + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BearerTokenAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other 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 BearerTokenAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py new file mode 100644 index 00000000..c543b221 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/connector_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 ConnectorType(str, Enum): + """ + ConnectorType + """ + + """ + allowed enum values + """ + GENERIC = 'generic' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ConnectorType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py new file mode 100644 index 00000000..7d531d22 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py new file mode 100644 index 00000000..823bd03c --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.connector_type import ConnectorType +from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth +from thousandeyes_sdk.connectors.models.header import Header +from typing import Optional, Set +from typing_extensions import Self + +class GenericConnector(BaseModel): + """ + GenericConnector + """ # noqa: E501 + id: Optional[StrictStr] = None + type: ConnectorType + name: StrictStr + target: StrictStr + authentication: Optional[GenericConnectorAuth] = None + last_modified_date: Optional[datetime] = Field(default=None, description="The date when the connector was last modified.", alias="lastModifiedDate") + headers: Optional[List[Header]] = None + __properties: ClassVar[List[str]] = ["id", "type", "name", "target", "authentication", "lastModifiedDate", "headers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GenericConnector from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable 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", + "last_modified_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 authentication + if self.authentication: + _dict['authentication'] = self.authentication.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in headers (list) + _items = [] + if self.headers: + for _item in self.headers: + if _item: + _items.append(_item.to_dict()) + _dict['headers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GenericConnector 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"), + "name": obj.get("name"), + "target": obj.get("target"), + "authentication": GenericConnectorAuth.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None, + "lastModifiedDate": obj.get("lastModifiedDate"), + "headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py new file mode 100644 index 00000000..8fb9651c --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connector_auth.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication +from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication +from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication +from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication +from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication +from pydantic import StrictStr, Field, model_serializer +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GENERICCONNECTORAUTH_ONE_OF_SCHEMAS = ["BasicAuthentication", "BearerTokenAuthentication", "OauthClientCredentialsAuthentication", "OauthCodeAuthentication", "OtherTokenAuthentication"] + +class GenericConnectorAuth(BaseModel): + """ + GenericConnectorAuth + """ + # data type: BasicAuthentication + oneof_schema_1_validator: Optional[BasicAuthentication] = None + # data type: BearerTokenAuthentication + oneof_schema_2_validator: Optional[BearerTokenAuthentication] = None + # data type: OtherTokenAuthentication + oneof_schema_3_validator: Optional[OtherTokenAuthentication] = None + # data type: OauthCodeAuthentication + oneof_schema_4_validator: Optional[OauthCodeAuthentication] = None + # data type: OauthClientCredentialsAuthentication + oneof_schema_5_validator: Optional[OauthClientCredentialsAuthentication] = None + actual_instance: Optional[Union[BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication]] = None + one_of_schemas: Set[str] = { "BasicAuthentication", "BearerTokenAuthentication", "OauthClientCredentialsAuthentication", "OauthCodeAuthentication", "OtherTokenAuthentication" } + + 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 = GenericConnectorAuth.model_construct() + error_messages = [] + match = 0 + # validate data type: BasicAuthentication + if not isinstance(v, BasicAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `BasicAuthentication`") + else: + match += 1 + # validate data type: BearerTokenAuthentication + if not isinstance(v, BearerTokenAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `BearerTokenAuthentication`") + else: + match += 1 + # validate data type: OtherTokenAuthentication + if not isinstance(v, OtherTokenAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `OtherTokenAuthentication`") + else: + match += 1 + # validate data type: OauthCodeAuthentication + if not isinstance(v, OauthCodeAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `OauthCodeAuthentication`") + else: + match += 1 + # validate data type: OauthClientCredentialsAuthentication + if not isinstance(v, OauthClientCredentialsAuthentication): + error_messages.append(f"Error! Input type `{type(v)}` is not `OauthClientCredentialsAuthentication`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. 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 BasicAuthentication + try: + instance.actual_instance = BasicAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into BearerTokenAuthentication + try: + instance.actual_instance = BearerTokenAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OtherTokenAuthentication + try: + instance.actual_instance = OtherTokenAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OauthCodeAuthentication + try: + instance.actual_instance = OauthCodeAuthentication.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OauthClientCredentialsAuthentication + try: + instance.actual_instance = OauthClientCredentialsAuthentication.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 GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages)) + else: + return instance + + @model_serializer(when_used="json") + def serialize_model(self): + return json.loads(self.to_json()) + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py new file mode 100644 index 00000000..de18de73 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/generic_connectors.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class GenericConnectors(BaseModel): + """ + GenericConnectors + """ # noqa: E501 + items: Optional[List[GenericConnector]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["items", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GenericConnectors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # override the default output from 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 GenericConnectors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [GenericConnector.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py new file mode 100644 index 00000000..ac7b1127 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/header.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not 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 Header(BaseModel): + """ + Header + """ # noqa: E501 + name: StrictStr + value: StrictStr = Field(description="The value of the header. Note that this value is obfuscated in the response, even when overwritten.") + __properties: ClassVar[List[str]] = ["name", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Header from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other 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 Header 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/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py new file mode 100644 index 00000000..73f1d4ee --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Link(BaseModel): + """ + A hyperlink from the containing resource to a URI. + """ # noqa: E501 + href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].") + templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.") + type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.") + deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.") + name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.") + profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.") + title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier") + hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource") + __properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Link from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Link from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "href": obj.get("href"), + "templated": obj.get("templated"), + "type": obj.get("type"), + "deprecation": obj.get("deprecation"), + "name": obj.get("name"), + "profile": obj.get("profile"), + "title": obj.get("title"), + "hreflang": obj.get("hreflang") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py new file mode 100644 index 00000000..fc85f2b2 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class OauthClientCredentialsAuthentication(BaseModel): + """ + OauthClientCredentialsAuthentication + """ # noqa: E501 + token: Optional[StrictStr] = None + oauth_client_id: StrictStr = Field(alias="oauthClientId") + oauth_token_url: StrictStr = Field(alias="oauthTokenUrl") + oauth_client_secret: StrictStr = Field(alias="oauthClientSecret") + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "oauthClientId", "oauthTokenUrl", "oauthClientSecret", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OauthClientCredentialsAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other 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 OauthClientCredentialsAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "oauthClientId": obj.get("oauthClientId"), + "oauthTokenUrl": obj.get("oauthTokenUrl"), + "oauthClientSecret": obj.get("oauthClientSecret"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py new file mode 100644 index 00000000..f302384a --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class OauthCodeAuthentication(BaseModel): + """ + OauthCodeAuthentication + """ # noqa: E501 + token: Optional[StrictStr] = None + refresh_token: Optional[StrictStr] = Field(default=None, alias="refreshToken") + oauth_client_id: StrictStr = Field(alias="oauthClientId") + oauth_auth_url: StrictStr = Field(alias="oauthAuthUrl") + oauth_token_url: StrictStr = Field(alias="oauthTokenUrl") + oauth_client_secret: StrictStr = Field(alias="oauthClientSecret") + code: StrictStr + redirect_uri: StrictStr = Field(alias="redirectUri") + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "refreshToken", "oauthClientId", "oauthAuthUrl", "oauthTokenUrl", "oauthClientSecret", "code", "redirectUri", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OauthCodeAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other 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 OauthCodeAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "refreshToken": obj.get("refreshToken"), + "oauthClientId": obj.get("oauthClientId"), + "oauthAuthUrl": obj.get("oauthAuthUrl"), + "oauthTokenUrl": obj.get("oauthTokenUrl"), + "oauthClientSecret": obj.get("oauthClientSecret"), + "code": obj.get("code"), + "redirectUri": obj.get("redirectUri"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py new file mode 100644 index 00000000..299d11a0 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_category.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 OperationCategory(str, Enum): + """ + OperationCategory + """ + + """ + allowed enum values + """ + ALERTS = 'alerts' + RECOMMENDATIONS = 'recommendations' + TRAFFIC_MINUS_MONITORING = 'traffic-monitoring' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OperationCategory from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py new file mode 100644 index 00000000..53ddac2d --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_status.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 OperationStatus(str, Enum): + """ + OperationStatus + """ + + """ + allowed enum values + """ + PENDING = 'pending' + CONNECTED = 'connected' + FAILING = 'failing' + UNVERIFIED = 'unverified' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OperationStatus from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py new file mode 100644 index 00000000..7dcc0cd3 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/operation_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + 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 OperationType(str, Enum): + """ + OperationType + """ + + """ + allowed enum values + """ + WEBHOOK = 'webhook' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OperationType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py new file mode 100644 index 00000000..6e68853b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/other_token_authentication.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do 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 +from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType +from typing import Optional, Set +from typing_extensions import Self + +class OtherTokenAuthentication(BaseModel): + """ + OtherTokenAuthentication + """ # noqa: E501 + token: StrictStr + type: AuthenticationType + __properties: ClassVar[List[str]] = ["token", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OtherTokenAuthentication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other 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 OtherTokenAuthentication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "type": obj.get("type") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py new file mode 100644 index 00000000..0f91f22f --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + A links object containing the self link. + """ # noqa: E501 + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py new file mode 100644 index 00000000..53c10fcb --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["error", "error_description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnauthorizedError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py new file mode 100644 index 00000000..4bd4575b --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item in self.errors: + if _item: + _items.append(_item.to_dict()) + _dict['errors'] = _items + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance"), + "errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py new file mode 100644 index 00000000..81afd489 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/validation_error_item.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ValidationErrorItem(BaseModel): + """ + ValidationErrorItem + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") + __properties: ClassVar[List[str]] = ["code", "field", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "field": obj.get("field"), + "message": obj.get("message") + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py new file mode 100644 index 00000000..73271864 --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operation.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.header import Header +from thousandeyes_sdk.connectors.models.operation_category import OperationCategory +from thousandeyes_sdk.connectors.models.operation_status import OperationStatus +from thousandeyes_sdk.connectors.models.operation_type import OperationType +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class WebhookOperation(BaseModel): + """ + WebhookOperation + """ # noqa: E501 + id: Optional[StrictStr] = None + name: StrictStr + enabled: Optional[StrictBool] = None + category: OperationCategory + status: OperationStatus + path: Optional[StrictStr] = None + payload: Optional[StrictStr] = Field(default=None, description="Handlebars template for the payload.") + headers: Optional[List[Header]] = None + var_query_params: Optional[StrictStr] = Field(default=None, description="Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value.", alias="queryParams") + type: Optional[OperationType] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "name", "enabled", "category", "status", "path", "payload", "headers", "queryParams", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookOperation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to 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 headers (list) + _items = [] + if self.headers: + for _item in self.headers: + if _item: + _items.append(_item.to_dict()) + _dict['headers'] = _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 WebhookOperation 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"), + "enabled": obj.get("enabled"), + "category": obj.get("category"), + "status": obj.get("status"), + "path": obj.get("path"), + "payload": obj.get("payload"), + "headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None, + "queryParams": obj.get("queryParams"), + "type": obj.get("type"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py new file mode 100644 index 00000000..39644e6d --- /dev/null +++ b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/models/webhook_operations.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.connectors.models.self_links import SelfLinks +from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation +from typing import Optional, Set +from typing_extensions import Self + +class WebhookOperations(BaseModel): + """ + WebhookOperations + """ # noqa: E501 + items: Optional[List[WebhookOperation]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["items", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookOperations from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _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 + # override the default output from 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 WebhookOperations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [WebhookOperation.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/py.typed b/thousandeyes-sdk-connectors/src/thousandeyes_sdk/connectors/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-connectors/test/__init__.py b/thousandeyes-sdk-connectors/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py b/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py new file mode 100644 index 00000000..8ecb7f5e --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py @@ -0,0 +1,282 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.connectors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi + + +class TestGenericConnectorsApi(unittest.TestCase): + """GenericConnectorsApi unit test stubs""" + + def setUp(self) -> None: + self.api = GenericConnectorsApi() + + def tearDown(self) -> None: + pass + + def test_create_generic_connector_models_validation(self) -> None: + """Test case for create_generic_connector request and response models""" + request_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_generic_connector_models_validation(self) -> None: + """Test case for delete_generic_connector request and response models""" + + + def test_get_generic_connector_models_validation(self) -> None: + """Test case for get_generic_connector request and response models""" + + response_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_generic_connectors_models_validation(self) -> None: + """Test case for get_generic_connectors request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }, { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnectors.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_list_generic_connector_operations_models_validation(self) -> None: + """Test case for list_generic_connector_operations request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_set_generic_connector_operations_models_validation(self) -> None: + """Test case for set_generic_connector_operations request and response models""" + request_body_json = """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_generic_connector_models_validation(self) -> None: + """Test case for update_generic_connector request and response models""" + request_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : "2023-10-01T12:00:00Z", + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py b/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py new file mode 100644 index 00000000..a8f88583 --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.connectors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi + + +class TestOperationConnectorsApi(unittest.TestCase): + """OperationConnectorsApi unit test stubs""" + + def setUp(self) -> None: + self.api = OperationConnectorsApi() + + def tearDown(self) -> None: + pass + + def test_get_operation_connectors_models_validation(self) -> None: + """Test case for get_operation_connectors request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_set_operation_connectors_models_validation(self) -> None: + """Test case for set_operation_connectors request and response models""" + request_body_json = """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-connectors/test/test_utils.py b/thousandeyes-sdk-connectors/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py b/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py new file mode 100644 index 00000000..db5e7850 --- /dev/null +++ b/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py @@ -0,0 +1,285 @@ +# coding: utf-8 + +""" + Integrations API + + Manage connectors and operations. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.connectors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi + + +class TestWebhookOperationsApi(unittest.TestCase): + """WebhookOperationsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebhookOperationsApi() + + def tearDown(self) -> None: + pass + + def test_create_webhook_operation_models_validation(self) -> None: + """Test case for create_webhook_operation request and response models""" + request_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_webhook_operation_models_validation(self) -> None: + """Test case for delete_webhook_operation request and response models""" + + + def test_get_webhook_operation_models_validation(self) -> None: + """Test case for get_webhook_operation request and response models""" + + response_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_webhook_operations_models_validation(self) -> None: + """Test case for get_webhook_operations request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }, { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperations.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_webhook_operation_models_validation(self) -> None: + """Test case for update_webhook_operation request and response models""" + request_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-credentials/README.md b/thousandeyes-sdk-credentials/README.md index 5feb758f..1e359317 100644 --- a/thousandeyes-sdk-credentials/README.md +++ b/thousandeyes-sdk-credentials/README.md @@ -13,7 +13,7 @@ For more information about credentials, see [Working With Secure Credentials](ht This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py index 394ec1da..44bcc026 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.credentials.models.credentials import Credentials from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-dashboards/README.md b/thousandeyes-sdk-dashboards/README.md index 848dc207..c5fbae29 100644 --- a/thousandeyes-sdk-dashboards/README.md +++ b/thousandeyes-sdk-dashboards/README.md @@ -3,7 +3,7 @@ Manage ThousandEyes Dashboards. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py index 7318b980..59d3cfcb 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py @@ -30,6 +30,7 @@ from thousandeyes_sdk.dashboards.models.update_snapshot_expiration_date_api_requ from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py index 2bdc3243..1d88776e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py @@ -31,6 +31,7 @@ from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py index 0844dded..45ed355f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.dashboards.models.api_context_filters_response import ApiC from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-emulation/README.md b/thousandeyes-sdk-emulation/README.md index b79b25f1..c76eb991 100644 --- a/thousandeyes-sdk-emulation/README.md +++ b/thousandeyes-sdk-emulation/README.md @@ -9,7 +9,7 @@ To access Emulation API operations, the following permissions are required: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-emulation/src/thousandeyes_sdk/emulation/api/emulation_api.py b/thousandeyes-sdk-emulation/src/thousandeyes_sdk/emulation/api/emulation_api.py index 8ee79fb9..766dd03e 100644 --- a/thousandeyes-sdk-emulation/src/thousandeyes_sdk/emulation/api/emulation_api.py +++ b/thousandeyes-sdk-emulation/src/thousandeyes_sdk/emulation/api/emulation_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.emulation.models.user_agents import UserAgents from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-agents/README.md b/thousandeyes-sdk-endpoint-agents/README.md index bfa7db74..d0c1249a 100644 --- a/thousandeyes-sdk-endpoint-agents/README.md +++ b/thousandeyes-sdk-endpoint-agents/README.md @@ -5,7 +5,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md b/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md index 96f19e38..33b794f2 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md +++ b/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **kernel_version** | **str** | | [optional] [readonly] **manufacturer** | **str** | | [optional] [readonly] **model** | **str** | | [optional] [readonly] +**serial_number** | **str** | | [optional] [readonly] **last_seen** | **datetime** | The last time the agent checked-in. | [optional] [readonly] **status** | [**Status**](Status.md) | | [optional] **deleted** | **bool** | | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_api.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_api.py index 1569eae7..e723064a 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_api.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_api.py @@ -31,6 +31,7 @@ from thousandeyes_sdk.endpoint_agents.models.list_endpoint_agents_response impor from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -937,6 +938,76 @@ class EndpointAgentsApi: + @validate_call + def filter_endpoint_agents_paginated( + self, + agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + expand: Annotated[Optional[List[ExpandEndpointAgentOptions]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, + include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Filter endpoint agents + + Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + + :param agent_search_request: The filter options for advanced search filtering for agents. (required) + :type agent_search_request: AgentSearchRequest + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. + :type expand: List[ExpandEndpointAgentOptions] + :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. + :type include_deleted: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_endpoint_agents, + lambda data: data.agents if data and data.agents else [], + agent_search_request = agent_search_request, max = max, cursor = cursor, aid = aid, expand = expand, include_deleted = include_deleted, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_endpoint_agents( @@ -1636,6 +1707,82 @@ class EndpointAgentsApi: + @validate_call + def get_endpoint_agents_paginated( + self, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + expand: Annotated[Optional[List[ExpandEndpointAgentOptions]], 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, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None, + agent_name: Annotated[Optional[StrictStr], Field(description="Returns only agents with the specified name. This is an exact match only. ")] = None, + computer_name: Annotated[Optional[StrictStr], Field(description="Returns only agents with the specified computer name. This is an exact match only. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List endpoint agents + + Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. + + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. + :type expand: List[ExpandEndpointAgentOptions] + :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. + :type include_deleted: bool + :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 agent_name: Returns only agents with the specified name. This is an exact match only. + :type agent_name: str + :param computer_name: Returns only agents with the specified computer name. This is an exact match only. + :type computer_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_endpoint_agents, + lambda data: data.agents if data and data.agents else [], + max = max, cursor = cursor, aid = aid, expand = expand, include_deleted = include_deleted, use_all_permitted_aids = use_all_permitted_aids, agent_name = agent_name, computer_name = computer_name, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_endpoint_agents( diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py index e9369966..5ebe60ec 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py index dd8aa233..58746c04 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py @@ -45,6 +45,7 @@ class EndpointAgent(BaseModel): kernel_version: Optional[StrictStr] = Field(default=None, alias="kernelVersion") manufacturer: Optional[StrictStr] = None model: Optional[StrictStr] = None + serial_number: Optional[StrictStr] = Field(default=None, alias="serialNumber") last_seen: Optional[datetime] = Field(default=None, description="The last time the agent checked-in.", alias="lastSeen") status: Optional[Status] = None deleted: Optional[StrictBool] = None @@ -65,7 +66,7 @@ class EndpointAgent(BaseModel): tcp_driver_available: Optional[StrictBool] = Field(default=None, description="Status of TCP test support on the agent.", alias="tcpDriverAvailable") npcap_version: Optional[StrictStr] = Field(default=None, description="For Windows agents, the version of the NPCAP driver that the agent has loaded.", alias="npcapVersion") links: Optional[SelfLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "lastSeen", "status", "deleted", "version", "targetVersion", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "externalMetadata", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "_links"] + __properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "serialNumber", "lastSeen", "status", "deleted", "version", "targetVersion", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "externalMetadata", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -118,6 +119,7 @@ class EndpointAgent(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([ "id", @@ -126,6 +128,7 @@ class EndpointAgent(BaseModel): "kernel_version", "manufacturer", "model", + "serial_number", "last_seen", "deleted", "version", @@ -205,6 +208,7 @@ class EndpointAgent(BaseModel): "kernelVersion": obj.get("kernelVersion"), "manufacturer": obj.get("manufacturer"), "model": obj.get("model"), + "serialNumber": obj.get("serialNumber"), "lastSeen": obj.get("lastSeen"), "status": obj.get("status"), "deleted": obj.get("deleted"), diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py index 7717eb19..e1a1a790 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py @@ -108,6 +108,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -276,6 +277,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -498,6 +500,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -656,6 +659,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -825,6 +829,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -1017,6 +1022,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -1175,6 +1181,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" @@ -1377,6 +1384,7 @@ class TestEndpointAgentsApi(unittest.TestCase): "computerName" : "DESKJET-123", "model" : "MacBookAir7,2", "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055", "externalMetadata" : [ { "key" : "anyConnectDeviceId", "value" : "DF434343D" diff --git a/thousandeyes-sdk-endpoint-instant-tests/README.md b/thousandeyes-sdk-endpoint-instant-tests/README.md index e97dcb35..1cccb615 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/README.md +++ b/thousandeyes-sdk-endpoint-instant-tests/README.md @@ -13,7 +13,7 @@ The URLs for these API test data endpoints are provided within the test definiti This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_endpoint_instant_scheduled_tests_api.py index 499485cd..0f61a3de 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_endpoint_instant_scheduled_tests_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_agent_to_server_tes from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_endpoint_instant_scheduled_tests_api.py index dbf314d4..6f124ff3 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_endpoint_instant_scheduled_tests_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_http_server_test im from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py index fd057104..3049ea0c 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py @@ -25,6 +25,7 @@ from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_run_scheduled_insta from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-labels/README.md b/thousandeyes-sdk-endpoint-labels/README.md index 094a2ab0..73806d1f 100644 --- a/thousandeyes-sdk-endpoint-labels/README.md +++ b/thousandeyes-sdk-endpoint-labels/README.md @@ -4,7 +4,7 @@ Manage labels applied to endpoint agents using this API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/endpoint_agent_labels_api.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/endpoint_agent_labels_api.py index 9f081ad4..54dc354e 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/endpoint_agent_labels_api.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/endpoint_agent_labels_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.endpoint_labels.models.labels import Labels from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -948,6 +949,70 @@ class EndpointAgentLabelsApi: + @validate_call + def get_endpoint_labels_paginated( + self, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[ExpandLabelOptions]], 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)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List labels + + Returns a list of labels. + + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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[ExpandLabelOptions] + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_endpoint_labels, + lambda data: data.labels if data and data.labels else [], + max = max, cursor = cursor, expand = expand, aid = aid, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_endpoint_labels( diff --git a/thousandeyes-sdk-endpoint-test-results/README.md b/thousandeyes-sdk-endpoint-test-results/README.md index 420041d2..d70382e0 100644 --- a/thousandeyes-sdk-endpoint-test-results/README.md +++ b/thousandeyes-sdk-endpoint-test-results/README.md @@ -3,7 +3,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/http_server_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/http_server_endpoint_scheduled_test_results_api.py index 88bfa69c..e660dbc1 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/http_server_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/http_server_endpoint_scheduled_test_results_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.endpoint_test_results.models.http_multi_endpoint_test_resu from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -45,6 +46,79 @@ class HTTPServerEndpointScheduledTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-endpoint-test-results")) self.api_client = api_client + @validate_call + def get_http_server_scheduled_test_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[ExpandEndpointHttpServerOptions]], 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, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve HTTP server scheduled test results + + Returns component-level (DNS, Connect, Wait and Receive) timing for the load of an object over HTTP. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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[ExpandEndpointHttpServerOptions] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_http_server_scheduled_test_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, expand = expand, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_http_server_scheduled_test_results( @@ -446,6 +520,82 @@ class HTTPServerEndpointScheduledTestResultsApi: + @validate_call + def get_multi_test_filtered_http_server_scheduled_test_results_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None, + expand: Annotated[Optional[List[ExpandEndpointHttpServerOptions]], 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, + http_endpoint_tests_data_rounds_search: Annotated[Optional[HttpEndpointTestsDataRoundsSearch], Field(description="Test data search filters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Filter HTTP server scheduled test results + + Returns component-level (DNS, Connect, Wait and Receive) timing for the load of an object over HTTP. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 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[ExpandEndpointHttpServerOptions] + :param http_endpoint_tests_data_rounds_search: Test data search filters. + :type http_endpoint_tests_data_rounds_search: HttpEndpointTestsDataRoundsSearch + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_multi_test_filtered_http_server_scheduled_test_results, + lambda data: data.results if data and data.results else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, use_all_permitted_aids = use_all_permitted_aids, expand = expand, http_endpoint_tests_data_rounds_search = http_endpoint_tests_data_rounds_search, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_multi_test_filtered_http_server_scheduled_test_results( @@ -880,6 +1030,82 @@ class HTTPServerEndpointScheduledTestResultsApi: + @validate_call + def get_single_test_filtered_http_server_scheduled_test_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[ExpandEndpointHttpServerOptions]], 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, + http_endpoint_tests_data_rounds_search: Annotated[Optional[HttpEndpointTestsDataRoundsSearch], Field(description="Test result search filters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Filter HTTP server result for a scheduled test + + Returns component-level timings for an object load over HTTP. These include DNS, connect, wait, and receive times for a single scheduled test. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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[ExpandEndpointHttpServerOptions] + :param http_endpoint_tests_data_rounds_search: Test result search filters. + :type http_endpoint_tests_data_rounds_search: HttpEndpointTestsDataRoundsSearch + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_single_test_filtered_http_server_scheduled_test_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, expand = expand, http_endpoint_tests_data_rounds_search = http_endpoint_tests_data_rounds_search, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_single_test_filtered_http_server_scheduled_test_results( diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_endpoint_test_results_api.py index 9f193e44..c9ac62b8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_endpoint_test_results_api.py @@ -30,6 +30,7 @@ from thousandeyes_sdk.endpoint_test_results.models.local_network_topology_result from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -46,6 +47,79 @@ class LocalNetworkEndpointTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-endpoint-test-results")) self.api_client = api_client + @validate_call + def filter_local_networks_test_results_topologies_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[ExpandLocalNetworkTopologyOptions]], Field(description="This parameter is optional and determines whether to expand resources related to local network topologies. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as `systemMetricDetails`, append `?expand=system-metric-detail` to the query.")] = None, + endpoint_network_topology_result_request: Optional[EndpointNetworkTopologyResultRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List endpoint network topologies probes + + Returns a list of all endpoint local network topologies probes. All results are provided, oldest to newest (according to a specified page index and size) unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter?window=12h' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Warning Note that a maximum of 12h worth of data can be retrieved at once. If you need more, you need to make multiple requests. Returns a `results` array of network topology probes. Network topology probes shown are from the latest round, or based on the time range specified. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param expand: This parameter is optional and determines whether to expand resources related to local network topologies. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as `systemMetricDetails`, append `?expand=system-metric-detail` to the query. + :type expand: List[ExpandLocalNetworkTopologyOptions] + :param endpoint_network_topology_result_request: + :type endpoint_network_topology_result_request: EndpointNetworkTopologyResultRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_local_networks_test_results_topologies, + lambda data: data.results if data and data.results else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, expand = expand, endpoint_network_topology_result_request = endpoint_network_topology_result_request, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_local_networks_test_results_topologies( diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_endpoint_test_results_api.py index 8ff3f1af..b3462e01 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_endpoint_test_results_api.py @@ -30,6 +30,7 @@ from thousandeyes_sdk.endpoint_test_results.models.path_vis_dynamic_endpoint_tes from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -46,6 +47,82 @@ class NetworkDynamicEndpointTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-endpoint-test-results")) self.api_client = api_client + @validate_call + def filter_dynamic_test_network_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[ExpandEndpointDynamicNetworkOptions]], 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 \"user-profile,\" append `?expand=user-profile` to the query.")] = None, + dynamic_endpoint_tests_data_round_search: Annotated[Optional[DynamicEndpointTestsDataRoundSearch], Field(description="Tests data search filters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve network dynamic test results + + Returns network metrics (`loss`, `latency`, `jitter` and `bandwidth`) from each endpoint agent, for each `roundId` in the requested window. When Time Frame is provided the rounds specific to the time frame is returned and the order is not pre-defined unless a user specifies the sort order in filter. When no time frame is provided the latest rounds are returned. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 \"user-profile,\" append `?expand=user-profile` to the query. + :type expand: List[ExpandEndpointDynamicNetworkOptions] + :param dynamic_endpoint_tests_data_round_search: Tests data search filters. + :type dynamic_endpoint_tests_data_round_search: DynamicEndpointTestsDataRoundSearch + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_dynamic_test_network_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, expand = expand, dynamic_endpoint_tests_data_round_search = dynamic_endpoint_tests_data_round_search, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_dynamic_test_network_results( @@ -805,6 +882,76 @@ class NetworkDynamicEndpointTestResultsApi: + @validate_call + def get_dynamic_test_path_vis_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve path visualization network dynamic test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_dynamic_test_path_vis_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_dynamic_test_path_vis_results( diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_endpoint_scheduled_test_results_api.py index 91d670a6..bd7ca532 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_endpoint_scheduled_test_results_api.py @@ -32,6 +32,7 @@ from thousandeyes_sdk.endpoint_test_results.models.path_vis_endpoint_test_result from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -48,6 +49,82 @@ class NetworkEndpointScheduledTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-endpoint-test-results")) self.api_client = api_client + @validate_call + def filter_scheduled_test_network_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[ExpandEndpointNetworkOptions]], 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 \"user-profile,\" append `?expand=user-profile` to the query.")] = None, + endpoint_tests_data_rounds_search: Annotated[Optional[EndpointTestsDataRoundsSearch], Field(description="Tests data search filters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve network scheduled test results + + Returns network metrics (loss, latency, and jitter) from each endpoint agent, for each roundId within the specified time window, as determined by search filters. If a time frame is provided, the rounds relevant to that time frame are returned, and the order is not predefined unless the user specifies a sort order in the filter. When no time frame is provided, the latest rounds are returned. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 \"user-profile,\" append `?expand=user-profile` to the query. + :type expand: List[ExpandEndpointNetworkOptions] + :param endpoint_tests_data_rounds_search: Tests data search filters. + :type endpoint_tests_data_rounds_search: EndpointTestsDataRoundsSearch + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_scheduled_test_network_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, expand = expand, endpoint_tests_data_rounds_search = endpoint_tests_data_rounds_search, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_scheduled_test_network_results( @@ -477,6 +554,85 @@ class NetworkEndpointScheduledTestResultsApi: + @validate_call + def filter_scheduled_tests_network_results_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None, + expand: Annotated[Optional[List[ExpandEndpointNetworkOptions]], 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 \"user-profile,\" append `?expand=user-profile` to the query.")] = None, + multi_test_id_endpoint_tests_data_rounds_search: Annotated[Optional[MultiTestIdEndpointTestsDataRoundsSearch], Field(description="Test data search filters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve network scheduled test results from multiple tests + + Returns network metrics, including loss, latency, and jitter, for multiple test IDs obtained from each endpoint agent. It allows you to specify a time window using search filters to retrieve metrics for specific round IDs within that time frame. The default order of results is unspecified unless you include a sorting preference in the filter. When no time frame is provided, the API returns metrics for the most recent rounds. Access to all accounts associated with the specified test IDs is required to use this endpoint. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 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 \"user-profile,\" append `?expand=user-profile` to the query. + :type expand: List[ExpandEndpointNetworkOptions] + :param multi_test_id_endpoint_tests_data_rounds_search: Test data search filters. + :type multi_test_id_endpoint_tests_data_rounds_search: MultiTestIdEndpointTestsDataRoundsSearch + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_scheduled_tests_network_results, + lambda data: data.results if data and data.results else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, max = max, cursor = cursor, use_all_permitted_aids = use_all_permitted_aids, expand = expand, multi_test_id_endpoint_tests_data_rounds_search = multi_test_id_endpoint_tests_data_rounds_search, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_scheduled_tests_network_results( @@ -1252,6 +1408,76 @@ class NetworkEndpointScheduledTestResultsApi: + @validate_call + def get_scheduled_test_path_vis_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve path visualization network scheduled test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_scheduled_test_path_vis_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_scheduled_test_path_vis_results( diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_endpoint_test_results_api.py index a804b83e..5fef3c5d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_endpoint_test_results_api.py @@ -32,6 +32,7 @@ from thousandeyes_sdk.endpoint_test_results.models.real_user_endpoint_test_resul from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -48,6 +49,76 @@ class RealUserEndpointTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-endpoint-test-results")) self.api_client = api_client + @validate_call + def filter_real_user_tests_network_results_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + real_user_endpoint_test_results_request: Optional[RealUserEndpointTestResultsRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List endpoint real user tests networks + + Returns a list of all endpoint real user tests. Sessions from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` Returns a `results` array of endpoint real user tests. Network sessions shown are from the latest round, or based on the time range specified. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param real_user_endpoint_test_results_request: + :type real_user_endpoint_test_results_request: RealUserEndpointTestResultsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_real_user_tests_network_results, + lambda data: data.results if data and data.results else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, real_user_endpoint_test_results_request = real_user_endpoint_test_results_request, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_real_user_tests_network_results( @@ -447,6 +518,76 @@ class RealUserEndpointTestResultsApi: + @validate_call + def filter_real_user_tests_results_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + real_user_endpoint_test_results_request: Optional[RealUserEndpointTestResultsRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List endpoint real user tests + + Returns a list of all endpoint real user tests. All results are provided, oldest to newest (according to a specified page index and size) unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param real_user_endpoint_test_results_request: + :type real_user_endpoint_test_results_request: RealUserEndpointTestResultsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_real_user_tests_results, + lambda data: data.results if data and data.results else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, real_user_endpoint_test_results_request = real_user_endpoint_test_results_request, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_real_user_tests_results( @@ -846,6 +987,76 @@ class RealUserEndpointTestResultsApi: + @validate_call + def filter_real_user_tests_visited_pages_results_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + real_user_endpoint_test_result_request_filter: Optional[RealUserEndpointTestResultRequestFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List endpoint real user tests visited pages + + Returns a list of all endpoint real user tests visited pages. Sessions from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` Returns a `results` array of user loaded pages in an endpoint real user test. Pages shown are from the latest round, or based on the time range specified. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param real_user_endpoint_test_result_request_filter: + :type real_user_endpoint_test_result_request_filter: RealUserEndpointTestResultRequestFilter + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.filter_real_user_tests_visited_pages_results, + lambda data: data.results if data and data.results else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, real_user_endpoint_test_result_request_filter = real_user_endpoint_test_result_request_filter, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def filter_real_user_tests_visited_pages_results( diff --git a/thousandeyes-sdk-endpoint-tests/README.md b/thousandeyes-sdk-endpoint-tests/README.md index acb33de2..5d6ac929 100644 --- a/thousandeyes-sdk-endpoint-tests/README.md +++ b/thousandeyes-sdk-endpoint-tests/README.md @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_dynamic_tests_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_dynamic_tests_api.py index ad39e5f8..47cd08b8 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_dynamic_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_dynamic_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_dynamic_test_update import from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_scheduled_tests_api.py index 8c344dbb..e4181713 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_scheduled_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_network_test_update import from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/endpoint_scheduled_tests_api.py index 05912d99..1daaf4a3 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/endpoint_scheduled_tests_api.py @@ -25,6 +25,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_tests import EndpointTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/http_server_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/http_server_endpoint_scheduled_tests_api.py index 330dcc54..eac35ab5 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/http_server_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/http_server_endpoint_scheduled_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_http_test_update import End from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-event-detection/README.md b/thousandeyes-sdk-event-detection/README.md index b6e92360..8c3f9a20 100644 --- a/thousandeyes-sdk-event-detection/README.md +++ b/thousandeyes-sdk-event-detection/README.md @@ -12,7 +12,7 @@ With the Events API, you can perform the following tasks on the ThousandEyes pla This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-event-detection/src/thousandeyes_sdk/event_detection/api/events_api.py b/thousandeyes-sdk-event-detection/src/thousandeyes_sdk/event_detection/api/events_api.py index c5768195..84022d08 100644 --- a/thousandeyes-sdk-event-detection/src/thousandeyes_sdk/event_detection/api/events_api.py +++ b/thousandeyes-sdk-event-detection/src/thousandeyes_sdk/event_detection/api/events_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.event_detection.models.events import Events from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -340,6 +341,76 @@ class EventsApi: + @validate_call + def get_events_paginated( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """List events + + Retrieves a list of events within the specified time window. If no events are active during the specified time range, an empty response is returned. **Note**: You must provide either a time window using the `window` parameter or specify `startDate` and `endDate`. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_events, + lambda data: data.events if data and data.events else [], + aid = aid, window = window, start_date = start_date, end_date = end_date, max = max, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_events( diff --git a/thousandeyes-sdk-instant-tests/README.md b/thousandeyes-sdk-instant-tests/README.md index 37d77aea..9df17dfe 100644 --- a/thousandeyes-sdk-instant-tests/README.md +++ b/thousandeyes-sdk-instant-tests/README.md @@ -6,7 +6,7 @@ The response does not include the immediate test results. Use the Test Results e This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_instant_tests_api.py index bbba52af..19ee65d5 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.expand_instant_test_options import Ex from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_instant_tests_api.py index b748b78f..98fd3c85 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.expand_instant_test_options import Ex from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_instant_tests_api.py index 412ad825..a243ed6b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.expand_instant_test_options import Ex from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_instant_tests_api.py index 6347c806..e7607ba3 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.expand_instant_test_options import Ex from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_instant_tests_api.py index 47bd0315..47fdb07e 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.expand_instant_test_options import Ex from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dnssec_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dnssec_instant_tests_api.py index e3337fb8..03e4bc91 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dnssec_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dnssec_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.expand_instant_test_options import Ex from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_instant_tests_api.py index b3fdb548..c4eda6a6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.ftp_server_instant_test_response impo from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_instant_tests_api.py index da86e7e0..e610bbc6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.page_load_instant_test_response impor from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_instant_tests_api.py index c1fe5e5c..095b1380 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.http_server_instant_test_response imp from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/instant_tests_api.py index 65044e8f..1dafd44f 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/instant_tests_api.py @@ -24,6 +24,7 @@ from typing_extensions import Annotated from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_instant_tests_api.py index e49f2e83..a2116dc0 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_response impo from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_instant_tests_api.py index d75fc27e..e0eeef6c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.voice_instant_test_response import Vo from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_instant_tests_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_instant_tests_api.py index 1ab55ab2..06355a72 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_instant_tests_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.instant_tests.models.web_transaction_instant_test_response from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-internet-insights/README.md b/thousandeyes-sdk-internet-insights/README.md index 7f4fbe8e..d9e6507e 100644 --- a/thousandeyes-sdk-internet-insights/README.md +++ b/thousandeyes-sdk-internet-insights/README.md @@ -14,7 +14,7 @@ For more information about Internet Insights, see the [Internet Insights](https: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_catalog_providers_api.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_catalog_providers_api.py index cb169534..942a4a01 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_catalog_providers_api.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_catalog_providers_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.internet_insights.models.api_catalog_provider_response imp from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_outages_api.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_outages_api.py index 177e1420..7cec7918 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_outages_api.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/internet_insights_outages_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.internet_insights.models.api_outages_response import ApiOu from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-snapshots/README.md b/thousandeyes-sdk-snapshots/README.md index de3b380b..da1973f1 100644 --- a/thousandeyes-sdk-snapshots/README.md +++ b/thousandeyes-sdk-snapshots/README.md @@ -3,7 +3,7 @@ Creates a new test snapshot in ThousandEyes. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/test_snapshots_api.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/test_snapshots_api.py index 3a06e773..f8a01e17 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/test_snapshots_api.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/test_snapshots_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.snapshots.models.snapshot_response import SnapshotResponse from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-streaming/README.md b/thousandeyes-sdk-streaming/README.md index 3220d4f9..ab3ecec5 100644 --- a/thousandeyes-sdk-streaming/README.md +++ b/thousandeyes-sdk-streaming/README.md @@ -15,7 +15,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [product docu This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py index 6fac7f8f..73df1065 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tags/README.md b/thousandeyes-sdk-tags/README.md index 5068476d..ced7cf49 100644 --- a/thousandeyes-sdk-tags/README.md +++ b/thousandeyes-sdk-tags/README.md @@ -16,7 +16,7 @@ Things to note with the ThousandEyes Tags API: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py index fbb2f466..9a4c3a42 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.tags.models.tag_assignment import TagAssignment from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py index 4cee5be5..d60cc8c4 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.tags.models.tags import Tags from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-test-results/README.md b/thousandeyes-sdk-test-results/README.md index 11ed48bb..19dddf95 100644 --- a/thousandeyes-sdk-test-results/README.md +++ b/thousandeyes-sdk-test-results/README.md @@ -3,7 +3,7 @@ Get test result metrics for Network and Application Synthetics tests. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_results_api.py index 0f7af5c8..00c23ee4 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_results_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.api_test_results import ApiTestResults from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -373,6 +374,76 @@ class APITestResultsApi: + @validate_call + def get_test_api_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get API test results + + Returns test results for API. If no window, start time, or end time is specified, data for the most recent round is returned. If a window or start time is specified, the results might include a round that started just before the specified start time. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_api_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_api_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_results_api.py index 7df41aee..060b23b0 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_results_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.test_results.models.dns_server_test_results import DnsServ from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,79 @@ class DNSServerTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_dns_server_result_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + server_id: Annotated[StrictStr, Field(description="DNS server ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get DNS server test results by server + + Returns mappings for a DNS record and resolution time to the specified server, measured from the requesting agent's point of view. This is similar to dig @server. + + :param test_id: Test ID (required) + :type test_id: str + :param server_id: DNS server ID (required) + :type server_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_dns_server_result, + lambda data: data.results if data and data.results else [], + test_id = test_id, server_id = server_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_dns_server_result( @@ -443,6 +517,76 @@ class DNSServerTestResultsApi: + @validate_call + def get_test_dns_servers_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get DNS server test results + + Returns the mappings for a DNS record, along with the resolution time to each authoritative server, measured from the agent's point of view. Similar to dig @server. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_dns_servers_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_dns_servers_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_results_api.py index e82c58f0..934ac92d 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_results_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.test_results.models.dns_trace_test_results import DnsTrace from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,76 @@ class DNSTraceTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_dns_trace_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get DNS trace test results + + Returns a DNS record from the requesting agent's point of view. This is similar to dig +trace. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_dns_trace_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_dns_trace_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_results_api.py index a5dc9d07..ceacc594 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_results_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.test_results.models.dnssec_test_results import DnssecTestR from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,76 @@ class DNSSECTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_dns_sec_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get DNSSEC test results + + Returns the keychain validity for a record on a domain secured using DNSSEC extensions. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_dns_sec_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_dns_sec_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_results_api.py index 74669208..50714135 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_results_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.bgp_test_route_information_results imp from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -43,6 +44,76 @@ class NetworkBGPTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_bgp_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get BGP test results + + Returns a list of BGP monitors actively monitoring the destination's target prefix. This list includes information about the prefix, its associated AS Number, and provides details regarding reachability, path updates, and any changes in the path for the target network. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_bgp_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_bgp_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_results_api.py index 0e91362e..d419d4c1 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_results_api.py @@ -30,6 +30,7 @@ from thousandeyes_sdk.test_results.models.test_direction import TestDirection from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -46,6 +47,79 @@ class NetworkTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_network_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + 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, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get network test results + + Returns network test results for every agent and round. If no window, start time, or end time is specified, data for the most recent round is returned. If a window or start time is specified, the results might include a round that started just before the specified start time. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_network_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, direction = direction, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_network_results( @@ -796,6 +870,79 @@ class NetworkTestResultsApi: + @validate_call + def get_test_path_vis_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """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. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. + :type direction: PathVisDirection + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_path_vis_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, direction = direction, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_path_vis_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_results_api.py index 9aad2438..2fc13ab0 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_results_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.test_results.models.rtp_stream_test_results import RtpStre from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,76 @@ class VoiceRTPServerTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_rtp_server_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Retrieve RTP server test metrics + + Returns Voice RTP server test results. If no window, start time, or end time is specified, data for the most recent round is returned. If a window or start time is specified, the results might include a round that started just before the specified start time. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_rtp_server_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_rtp_server_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_results_api.py index ed775166..d0f21799 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_results_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.test_results.models.sip_server_test_results import SipServ from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,76 @@ class VoiceSIPServerTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_sip_server_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get SIP server test results + + Returns Voice SIP server test results. If no window, start time, or end time is specified, data for the most recent round is returned. If a window or start time is specified, the results might include a round that started just before the specified start time. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_sip_server_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_sip_server_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_results_api.py index f622e8b1..92bc7fff 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_results_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.test_results.models.ftp_server_test_results import FtpServ from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -42,6 +43,76 @@ class WebFTPServerTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_ftp_server_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get FTP server test results + + Returns test results for FTP server requests. If no window, start time, or end time is specified, data for the most recent round is returned. If a window or start time is specified, the results might include a round that started just before the specified start time. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_ftp_server_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_ftp_server_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_results_api.py index fd7a8490..1d6e8a28 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_results_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.http_test_results import HttpTestResul from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -43,6 +44,79 @@ class WebHTTPServerTestResultsApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-test-results")) self.api_client = api_client + @validate_call + def get_test_http_server_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + 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, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get HTTP server test results + + Returns results for requests made over HTTP. Components include DNS, Connect, Wait, Receive, and Fetch. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_http_server_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, expand = expand, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_http_server_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_results_api.py index 65f65bdd..5f5d4569 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_results_api.py @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.page_load_test_results import PageLoad from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -373,6 +374,76 @@ class WebPageLoadTestResultsApi: + @validate_call + def get_test_page_load_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get page load server test results + + Returns results for page load server tests with a focus on page load times and DOM for a web page. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_page_load_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_page_load_results( diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_results_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_results_api.py index edc79114..7c8e06dc 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_results_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_results_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.test_results.models.web_transaction_test_results import We from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -719,6 +720,76 @@ class WebTransactionsTestResultsApi: + @validate_call + def get_test_web_transaction_results_paginated( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginationIterable: + """Get web transactions test results + + Returns test results for web transactions. If no window, start time, or end time is specified, data for the most recent round is returned. If a window or start time is specified, the results might include a round that started just before the specified start time. + + :param test_id: Test ID (required) + :type test_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + return PaginationIterable( + self.get_test_web_transaction_results, + lambda data: data.results if data and data.results else [], + test_id = test_id, aid = aid, window = window, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_test_web_transaction_results( diff --git a/thousandeyes-sdk-tests/README.md b/thousandeyes-sdk-tests/README.md index e89e4f54..e6862dd2 100644 --- a/thousandeyes-sdk-tests/README.md +++ b/thousandeyes-sdk-tests/README.md @@ -4,7 +4,7 @@ This API allows you to list, create, edit, and delete Network and Application Sy This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_tests_api.py index 41d8f2bd..7d592ccd 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_tests_api.py index cb8e3dba..507c4318 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_tests_api.py index 9b2a4d0e..f8e9e2a1 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_tests_api.py index e984d015..e3200d7d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_tests_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_bgp_test_request import UpdateBgpTestR from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_tests_api.py index e5ac339b..e4449b4c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_tests_api.py index 8f65b3ed..f2667966 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_tests_api.py index 06b994ac..53f851b9 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_tests_api.py index 01abeac6..02213877 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.ftp_server_tests import FtpServerTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_tests_api.py index 0fefc11b..c23a899c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.http_server_tests import HttpServerTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_tests_api.py index 207ac98f..4b6db4b4 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.page_load_tests import PageLoadTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py index 5822184f..7209d8fe 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.tests.models.interface_groups import InterfaceGroups from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_tests_api.py index aefa9909..70f55d06 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.sip_server_tests import SipServerTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/tests_api.py index f90b786e..0cd6dc1e 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/tests_api.py @@ -26,6 +26,7 @@ from thousandeyes_sdk.tests.models.tests import Tests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_tests_api.py index 35bc38bc..66af5c7c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.voice_tests import VoiceTests from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_tests_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_tests_api.py index 45951176..6ee64c23 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_tests_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_tests_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.tests.models.web_transaction_tests import WebTransactionTe from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-usage/README.md b/thousandeyes-sdk-usage/README.md index c450b771..43e0b953 100644 --- a/thousandeyes-sdk-usage/README.md +++ b/thousandeyes-sdk-usage/README.md @@ -18,7 +18,7 @@ Refer to the Usage API operations for detailed usage instructions and optional p This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.73 +- API version: 7.0.74 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py index 2edcc84a..9af00b21 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py @@ -28,6 +28,7 @@ from thousandeyes_sdk.usage.models.quotas_unassign import QuotasUnassign from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse + from thousandeyes_sdk.core.rest import RESTResponseType diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py index b219551f..c1396d8f 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py @@ -29,6 +29,7 @@ from thousandeyes_sdk.usage.models.usage import Usage from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable from thousandeyes_sdk.core.rest import RESTResponseType @@ -45,6 +46,67 @@ class UsageApi: api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-usage")) self.api_client = api_client + @validate_call + def get_enterprise_agents_units_usage_paginated( + 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, + ) -> PaginationIterable: + """Get enterprise agent usage + + This operation returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :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 + return PaginationIterable( + self.get_enterprise_agents_units_usage, + lambda data: data.breakdowns if data and data.breakdowns else [], + start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_enterprise_agents_units_usage( @@ -379,6 +441,70 @@ class UsageApi: + @validate_call + def get_tests_units_usage_paginated( + 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, + ) -> PaginationIterable: + """Get cloud and enterprise agents units usage + + This operation returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :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 + return PaginationIterable( + self.get_tests_units_usage, + lambda data: data.breakdowns if data and data.breakdowns else [], + aid = aid, start_date = start_date, end_date = end_date, cursor = cursor, + _request_timeout=_request_timeout, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + @validate_call def get_tests_units_usage(