thousandeyes-sdk-instant-tests 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. thousandeyes_sdk/instant_tests/__init__.py +117 -0
  2. thousandeyes_sdk/instant_tests/api/__init__.py +17 -0
  3. thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py +376 -0
  4. thousandeyes_sdk/instant_tests/api/agent_to_server_api.py +376 -0
  5. thousandeyes_sdk/instant_tests/api/api_api.py +376 -0
  6. thousandeyes_sdk/instant_tests/api/dns_security_api.py +376 -0
  7. thousandeyes_sdk/instant_tests/api/dns_server_api.py +376 -0
  8. thousandeyes_sdk/instant_tests/api/dns_trace_api.py +376 -0
  9. thousandeyes_sdk/instant_tests/api/ftp_server_api.py +376 -0
  10. thousandeyes_sdk/instant_tests/api/http_page_load_api.py +376 -0
  11. thousandeyes_sdk/instant_tests/api/http_server_api.py +376 -0
  12. thousandeyes_sdk/instant_tests/api/run_api.py +338 -0
  13. thousandeyes_sdk/instant_tests/api/sip_server_api.py +376 -0
  14. thousandeyes_sdk/instant_tests/api/voice_api.py +376 -0
  15. thousandeyes_sdk/instant_tests/api/web_transaction_api.py +376 -0
  16. thousandeyes_sdk/instant_tests/models/__init__.py +100 -0
  17. thousandeyes_sdk/instant_tests/models/agent.py +125 -0
  18. thousandeyes_sdk/instant_tests/models/agent_base.py +98 -0
  19. thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +198 -0
  20. thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +176 -0
  21. thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +123 -0
  22. thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +37 -0
  23. thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +203 -0
  24. thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +181 -0
  25. thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +128 -0
  26. thousandeyes_sdk/instant_tests/models/api_instant_test.py +214 -0
  27. thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +192 -0
  28. thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +90 -0
  29. thousandeyes_sdk/instant_tests/models/api_properties.py +137 -0
  30. thousandeyes_sdk/instant_tests/models/api_request.py +138 -0
  31. thousandeyes_sdk/instant_tests/models/api_request_assertion.py +94 -0
  32. thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +37 -0
  33. thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +39 -0
  34. thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +38 -0
  35. thousandeyes_sdk/instant_tests/models/api_request_header.py +90 -0
  36. thousandeyes_sdk/instant_tests/models/api_request_method.py +40 -0
  37. thousandeyes_sdk/instant_tests/models/api_request_variable.py +90 -0
  38. thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +38 -0
  39. thousandeyes_sdk/instant_tests/models/dns_query_class.py +37 -0
  40. thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +170 -0
  41. thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +148 -0
  42. thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +95 -0
  43. thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +208 -0
  44. thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +178 -0
  45. thousandeyes_sdk/instant_tests/models/dns_server_properties.py +133 -0
  46. thousandeyes_sdk/instant_tests/models/dns_servers_request.py +88 -0
  47. thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +173 -0
  48. thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +151 -0
  49. thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +98 -0
  50. thousandeyes_sdk/instant_tests/models/error.py +96 -0
  51. thousandeyes_sdk/instant_tests/models/expand.py +38 -0
  52. thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +207 -0
  53. thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +132 -0
  54. thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +38 -0
  55. thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +246 -0
  56. thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +224 -0
  57. thousandeyes_sdk/instant_tests/models/http_server_properties.py +171 -0
  58. thousandeyes_sdk/instant_tests/models/instant_test.py +152 -0
  59. thousandeyes_sdk/instant_tests/models/instant_test_request.py +100 -0
  60. thousandeyes_sdk/instant_tests/models/link.py +102 -0
  61. thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +254 -0
  62. thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +232 -0
  63. thousandeyes_sdk/instant_tests/models/page_load_properties.py +179 -0
  64. thousandeyes_sdk/instant_tests/models/server_instant_test_request.py +185 -0
  65. thousandeyes_sdk/instant_tests/models/shared_with_account.py +90 -0
  66. thousandeyes_sdk/instant_tests/models/simple_agent.py +122 -0
  67. thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +191 -0
  68. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +175 -0
  69. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py +197 -0
  70. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +204 -0
  71. thousandeyes_sdk/instant_tests/models/sip_server_properties.py +116 -0
  72. thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +38 -0
  73. thousandeyes_sdk/instant_tests/models/test_agent.py +90 -0
  74. thousandeyes_sdk/instant_tests/models/test_auth_type.py +40 -0
  75. thousandeyes_sdk/instant_tests/models/test_custom_headers.py +92 -0
  76. thousandeyes_sdk/instant_tests/models/test_direction.py +38 -0
  77. thousandeyes_sdk/instant_tests/models/test_dns_server.py +90 -0
  78. thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +37 -0
  79. thousandeyes_sdk/instant_tests/models/test_dscp_id.py +57 -0
  80. thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +39 -0
  81. thousandeyes_sdk/instant_tests/models/test_label.py +92 -0
  82. thousandeyes_sdk/instant_tests/models/test_links.py +102 -0
  83. thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +38 -0
  84. thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +37 -0
  85. thousandeyes_sdk/instant_tests/models/test_probe_mode.py +38 -0
  86. thousandeyes_sdk/instant_tests/models/test_protocol.py +38 -0
  87. thousandeyes_sdk/instant_tests/models/test_self_link.py +102 -0
  88. thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +100 -0
  89. thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +40 -0
  90. thousandeyes_sdk/instant_tests/models/test_type.py +48 -0
  91. thousandeyes_sdk/instant_tests/models/unauthorized_error.py +90 -0
  92. thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +128 -0
  93. thousandeyes_sdk/instant_tests/models/validation_error.py +111 -0
  94. thousandeyes_sdk/instant_tests/models/validation_error_item.py +92 -0
  95. thousandeyes_sdk/instant_tests/models/voice_instant_test.py +189 -0
  96. thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +167 -0
  97. thousandeyes_sdk/instant_tests/models/voice_properties.py +114 -0
  98. thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +258 -0
  99. thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +236 -0
  100. thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +181 -0
  101. thousandeyes_sdk/instant_tests/py.typed +0 -0
  102. thousandeyes_sdk_instant_tests-1.0.0.dist-info/LICENSE +176 -0
  103. thousandeyes_sdk_instant_tests-1.0.0.dist-info/METADATA +423 -0
  104. thousandeyes_sdk_instant_tests-1.0.0.dist-info/NOTICE +7 -0
  105. thousandeyes_sdk_instant_tests-1.0.0.dist-info/RECORD +107 -0
  106. thousandeyes_sdk_instant_tests-1.0.0.dist-info/WHEEL +5 -0
  107. thousandeyes_sdk_instant_tests-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,376 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Instant Tests API
5
+
6
+ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test.
7
+
8
+ The version of the OpenAPI document: 7.0.8
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+ from importlib.metadata import version
19
+
20
+ import thousandeyes_sdk.instant_tests.models
21
+
22
+ from pydantic import Field, StrictStr
23
+ from typing import List, Optional
24
+ from typing_extensions import Annotated
25
+ from thousandeyes_sdk.instant_tests.models.expand import Expand
26
+ from thousandeyes_sdk.instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest
27
+ from thousandeyes_sdk.instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest
28
+
29
+ from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
30
+ from thousandeyes_sdk.core.api_response import ApiResponse
31
+ from thousandeyes_sdk.core.rest import RESTResponseType
32
+
33
+
34
+ class WebTransactionApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-instant-tests"))
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def create_web_transaction_instant_test(
50
+ self,
51
+ web_transaction_instant_test_request: WebTransactionInstantTestRequest,
52
+ aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
53
+ expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.")] = None,
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Annotated[StrictFloat, Field(gt=0)]
60
+ ]
61
+ ] = None,
62
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
63
+ _content_type: Optional[StrictStr] = None,
64
+ _headers: Optional[Dict[StrictStr, Any]] = None,
65
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
+ ) -> WebTransactionInstantTest:
67
+ """Create web transactions instant test
68
+
69
+ Creates and runs a new Web transactions instant test.
70
+
71
+ :param web_transaction_instant_test_request: (required)
72
+ :type web_transaction_instant_test_request: WebTransactionInstantTestRequest
73
+ :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
74
+ :type aid: str
75
+ :param expand: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.
76
+ :type expand: List[Expand]
77
+ :param _request_timeout: timeout setting for this request. If one
78
+ number provided, it will be total request
79
+ timeout. It can also be a pair (tuple) of
80
+ (connection, read) timeouts.
81
+ :type _request_timeout: int, tuple(int, int), optional
82
+ :param _request_auth: set to override the auth_settings for an a single
83
+ request; this effectively ignores the
84
+ authentication in the spec for a single request.
85
+ :type _request_auth: dict, optional
86
+ :param _content_type: force content-type for the request.
87
+ :type _content_type: str, Optional
88
+ :param _headers: set to override the headers for a single
89
+ request; this effectively ignores the headers
90
+ in the spec for a single request.
91
+ :type _headers: dict, optional
92
+ :param _host_index: set to override the host_index for a single
93
+ request; this effectively ignores the host_index
94
+ in the spec for a single request.
95
+ :type _host_index: int, optional
96
+ :return: Returns the result object.
97
+ """ # noqa: E501
98
+
99
+ _param = self._create_web_transaction_instant_test_serialize(
100
+ web_transaction_instant_test_request=web_transaction_instant_test_request,
101
+ aid=aid,
102
+ expand=expand,
103
+ _request_auth=_request_auth,
104
+ _content_type=_content_type,
105
+ _headers=_headers,
106
+ _host_index=_host_index
107
+ )
108
+
109
+ _response_types_map: Dict[str, Optional[str]] = {
110
+ '201': "WebTransactionInstantTest",
111
+ '400': "ValidationError",
112
+ '401': "UnauthorizedError",
113
+ '403': "Error",
114
+ '404': "Error",
115
+ '429': "Error",
116
+ '500': "Error",
117
+ '502': "Error",
118
+ }
119
+ response_data = self.api_client.call_api(
120
+ *_param,
121
+ _request_timeout=_request_timeout
122
+ )
123
+ response_data.read()
124
+ return self.api_client.response_deserialize(
125
+ response_data=response_data,
126
+ response_types_map=_response_types_map,
127
+ models=thousandeyes_sdk.instant_tests.models,
128
+ ).data
129
+
130
+
131
+ @validate_call
132
+ def create_web_transaction_instant_test_with_http_info(
133
+ self,
134
+ web_transaction_instant_test_request: WebTransactionInstantTestRequest,
135
+ aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
136
+ expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.")] = None,
137
+ _request_timeout: Union[
138
+ None,
139
+ Annotated[StrictFloat, Field(gt=0)],
140
+ Tuple[
141
+ Annotated[StrictFloat, Field(gt=0)],
142
+ Annotated[StrictFloat, Field(gt=0)]
143
+ ]
144
+ ] = None,
145
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
146
+ _content_type: Optional[StrictStr] = None,
147
+ _headers: Optional[Dict[StrictStr, Any]] = None,
148
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
149
+ ) -> ApiResponse[WebTransactionInstantTest]:
150
+ """Create web transactions instant test
151
+
152
+ Creates and runs a new Web transactions instant test.
153
+
154
+ :param web_transaction_instant_test_request: (required)
155
+ :type web_transaction_instant_test_request: WebTransactionInstantTestRequest
156
+ :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
157
+ :type aid: str
158
+ :param expand: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.
159
+ :type expand: List[Expand]
160
+ :param _request_timeout: timeout setting for this request. If one
161
+ number provided, it will be total request
162
+ timeout. It can also be a pair (tuple) of
163
+ (connection, read) timeouts.
164
+ :type _request_timeout: int, tuple(int, int), optional
165
+ :param _request_auth: set to override the auth_settings for an a single
166
+ request; this effectively ignores the
167
+ authentication in the spec for a single request.
168
+ :type _request_auth: dict, optional
169
+ :param _content_type: force content-type for the request.
170
+ :type _content_type: str, Optional
171
+ :param _headers: set to override the headers for a single
172
+ request; this effectively ignores the headers
173
+ in the spec for a single request.
174
+ :type _headers: dict, optional
175
+ :param _host_index: set to override the host_index for a single
176
+ request; this effectively ignores the host_index
177
+ in the spec for a single request.
178
+ :type _host_index: int, optional
179
+ :return: Returns the result object.
180
+ """ # noqa: E501
181
+
182
+ _param = self._create_web_transaction_instant_test_serialize(
183
+ web_transaction_instant_test_request=web_transaction_instant_test_request,
184
+ aid=aid,
185
+ expand=expand,
186
+ _request_auth=_request_auth,
187
+ _content_type=_content_type,
188
+ _headers=_headers,
189
+ _host_index=_host_index
190
+ )
191
+
192
+ _response_types_map: Dict[str, Optional[str]] = {
193
+ '201': "WebTransactionInstantTest",
194
+ '400': "ValidationError",
195
+ '401': "UnauthorizedError",
196
+ '403': "Error",
197
+ '404': "Error",
198
+ '429': "Error",
199
+ '500': "Error",
200
+ '502': "Error",
201
+ }
202
+ response_data = self.api_client.call_api(
203
+ *_param,
204
+ _request_timeout=_request_timeout
205
+ )
206
+ response_data.read()
207
+ return self.api_client.response_deserialize(
208
+ response_data=response_data,
209
+ response_types_map=_response_types_map,
210
+ models=thousandeyes_sdk.instant_tests.models,
211
+ )
212
+
213
+
214
+ @validate_call
215
+ def create_web_transaction_instant_test_without_preload_content(
216
+ self,
217
+ web_transaction_instant_test_request: WebTransactionInstantTestRequest,
218
+ aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
219
+ expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.")] = None,
220
+ _request_timeout: Union[
221
+ None,
222
+ Annotated[StrictFloat, Field(gt=0)],
223
+ Tuple[
224
+ Annotated[StrictFloat, Field(gt=0)],
225
+ Annotated[StrictFloat, Field(gt=0)]
226
+ ]
227
+ ] = None,
228
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
229
+ _content_type: Optional[StrictStr] = None,
230
+ _headers: Optional[Dict[StrictStr, Any]] = None,
231
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
232
+ ) -> RESTResponseType:
233
+ """Create web transactions instant test
234
+
235
+ Creates and runs a new Web transactions instant test.
236
+
237
+ :param web_transaction_instant_test_request: (required)
238
+ :type web_transaction_instant_test_request: WebTransactionInstantTestRequest
239
+ :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
240
+ :type aid: str
241
+ :param expand: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`.
242
+ :type expand: List[Expand]
243
+ :param _request_timeout: timeout setting for this request. If one
244
+ number provided, it will be total request
245
+ timeout. It can also be a pair (tuple) of
246
+ (connection, read) timeouts.
247
+ :type _request_timeout: int, tuple(int, int), optional
248
+ :param _request_auth: set to override the auth_settings for an a single
249
+ request; this effectively ignores the
250
+ authentication in the spec for a single request.
251
+ :type _request_auth: dict, optional
252
+ :param _content_type: force content-type for the request.
253
+ :type _content_type: str, Optional
254
+ :param _headers: set to override the headers for a single
255
+ request; this effectively ignores the headers
256
+ in the spec for a single request.
257
+ :type _headers: dict, optional
258
+ :param _host_index: set to override the host_index for a single
259
+ request; this effectively ignores the host_index
260
+ in the spec for a single request.
261
+ :type _host_index: int, optional
262
+ :return: Returns the result object.
263
+ """ # noqa: E501
264
+
265
+ _param = self._create_web_transaction_instant_test_serialize(
266
+ web_transaction_instant_test_request=web_transaction_instant_test_request,
267
+ aid=aid,
268
+ expand=expand,
269
+ _request_auth=_request_auth,
270
+ _content_type=_content_type,
271
+ _headers=_headers,
272
+ _host_index=_host_index
273
+ )
274
+
275
+ _response_types_map: Dict[str, Optional[str]] = {
276
+ '201': "WebTransactionInstantTest",
277
+ '400': "ValidationError",
278
+ '401': "UnauthorizedError",
279
+ '403': "Error",
280
+ '404': "Error",
281
+ '429': "Error",
282
+ '500': "Error",
283
+ '502': "Error",
284
+ }
285
+ response_data = self.api_client.call_api(
286
+ *_param,
287
+ _request_timeout=_request_timeout
288
+ )
289
+ return response_data.response
290
+
291
+
292
+ def _create_web_transaction_instant_test_serialize(
293
+ self,
294
+ web_transaction_instant_test_request,
295
+ aid,
296
+ expand,
297
+ _request_auth,
298
+ _content_type,
299
+ _headers,
300
+ _host_index,
301
+ ) -> RequestSerialized:
302
+
303
+ _host = None
304
+
305
+ _collection_formats: Dict[str, str] = {
306
+ 'expand': 'csv',
307
+ }
308
+
309
+ _path_params: Dict[str, str] = {}
310
+ _query_params: List[Tuple[str, str]] = []
311
+ _header_params: Dict[str, Optional[str]] = _headers or {}
312
+ _form_params: List[Tuple[str, str]] = []
313
+ _files: Dict[str, Union[str, bytes]] = {}
314
+ _body_params: Optional[bytes] = None
315
+
316
+ # process the path parameters
317
+ # process the query parameters
318
+ if aid is not None:
319
+
320
+ _query_params.append(('aid', aid))
321
+
322
+ if expand is not None:
323
+
324
+ _query_params.append(('expand', expand))
325
+
326
+ # process the header parameters
327
+ # process the form parameters
328
+ # process the body parameter
329
+ if web_transaction_instant_test_request is not None:
330
+ _body_params = web_transaction_instant_test_request
331
+
332
+
333
+ # set the HTTP header `Accept`
334
+ _header_params['Accept'] = self.api_client.select_header_accept(
335
+ [
336
+ 'application/hal+json',
337
+ 'application/json',
338
+ 'application/problem+json'
339
+ ]
340
+ )
341
+
342
+ # set the HTTP header `Content-Type`
343
+ if _content_type:
344
+ _header_params['Content-Type'] = _content_type
345
+ else:
346
+ _default_content_type = (
347
+ self.api_client.select_header_content_type(
348
+ [
349
+ 'application/json'
350
+ ]
351
+ )
352
+ )
353
+ if _default_content_type is not None:
354
+ _header_params['Content-Type'] = _default_content_type
355
+
356
+ # authentication setting
357
+ _auth_settings: List[str] = [
358
+ 'BearerAuth'
359
+ ]
360
+
361
+ return self.api_client.param_serialize(
362
+ method='POST',
363
+ resource_path='/v7/tests/web-transactions/instant',
364
+ path_params=_path_params,
365
+ query_params=_query_params,
366
+ header_params=_header_params,
367
+ body=_body_params,
368
+ post_params=_form_params,
369
+ files=_files,
370
+ auth_settings=_auth_settings,
371
+ collection_formats=_collection_formats,
372
+ _host=_host,
373
+ _request_auth=_request_auth
374
+ )
375
+
376
+
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+ """
5
+ Instant Tests API
6
+
7
+ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test.
8
+
9
+ The version of the OpenAPI document: 7.0.8
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ # import models into model package
17
+ from thousandeyes_sdk.instant_tests.models.agent import Agent
18
+ from thousandeyes_sdk.instant_tests.models.agent_base import AgentBase
19
+ from thousandeyes_sdk.instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest
20
+ from thousandeyes_sdk.instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest
21
+ from thousandeyes_sdk.instant_tests.models.agent_to_agent_properties import AgentToAgentProperties
22
+ from thousandeyes_sdk.instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol
23
+ from thousandeyes_sdk.instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest
24
+ from thousandeyes_sdk.instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest
25
+ from thousandeyes_sdk.instant_tests.models.agent_to_server_properties import AgentToServerProperties
26
+ from thousandeyes_sdk.instant_tests.models.api_instant_test import ApiInstantTest
27
+ from thousandeyes_sdk.instant_tests.models.api_instant_test_request import ApiInstantTestRequest
28
+ from thousandeyes_sdk.instant_tests.models.api_predefined_variable import ApiPredefinedVariable
29
+ from thousandeyes_sdk.instant_tests.models.api_properties import ApiProperties
30
+ from thousandeyes_sdk.instant_tests.models.api_request import ApiRequest
31
+ from thousandeyes_sdk.instant_tests.models.api_request_assertion import ApiRequestAssertion
32
+ from thousandeyes_sdk.instant_tests.models.api_request_assertion_name import ApiRequestAssertionName
33
+ from thousandeyes_sdk.instant_tests.models.api_request_assertion_operator import ApiRequestAssertionOperator
34
+ from thousandeyes_sdk.instant_tests.models.api_request_auth_type import ApiRequestAuthType
35
+ from thousandeyes_sdk.instant_tests.models.api_request_header import ApiRequestHeader
36
+ from thousandeyes_sdk.instant_tests.models.api_request_method import ApiRequestMethod
37
+ from thousandeyes_sdk.instant_tests.models.api_request_variable import ApiRequestVariable
38
+ from thousandeyes_sdk.instant_tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
39
+ from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass
40
+ from thousandeyes_sdk.instant_tests.models.dns_sec_instant_test import DnsSecInstantTest
41
+ from thousandeyes_sdk.instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest
42
+ from thousandeyes_sdk.instant_tests.models.dns_sec_properties import DnsSecProperties
43
+ from thousandeyes_sdk.instant_tests.models.dns_server_instant_test import DnsServerInstantTest
44
+ from thousandeyes_sdk.instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest
45
+ from thousandeyes_sdk.instant_tests.models.dns_server_properties import DnsServerProperties
46
+ from thousandeyes_sdk.instant_tests.models.dns_servers_request import DnsServersRequest
47
+ from thousandeyes_sdk.instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest
48
+ from thousandeyes_sdk.instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest
49
+ from thousandeyes_sdk.instant_tests.models.dns_trace_properties import DnsTraceProperties
50
+ from thousandeyes_sdk.instant_tests.models.error import Error
51
+ from thousandeyes_sdk.instant_tests.models.expand import Expand
52
+ from thousandeyes_sdk.instant_tests.models.ftp_server_instant_test import FtpServerInstantTest
53
+ from thousandeyes_sdk.instant_tests.models.ftp_server_properties import FtpServerProperties
54
+ from thousandeyes_sdk.instant_tests.models.ftp_server_request_type import FtpServerRequestType
55
+ from thousandeyes_sdk.instant_tests.models.http_server_instant_test import HttpServerInstantTest
56
+ from thousandeyes_sdk.instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest
57
+ from thousandeyes_sdk.instant_tests.models.http_server_properties import HttpServerProperties
58
+ from thousandeyes_sdk.instant_tests.models.instant_test import InstantTest
59
+ from thousandeyes_sdk.instant_tests.models.instant_test_request import InstantTestRequest
60
+ from thousandeyes_sdk.instant_tests.models.link import Link
61
+ from thousandeyes_sdk.instant_tests.models.page_load_instant_test import PageLoadInstantTest
62
+ from thousandeyes_sdk.instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest
63
+ from thousandeyes_sdk.instant_tests.models.page_load_properties import PageLoadProperties
64
+ from thousandeyes_sdk.instant_tests.models.server_instant_test_request import ServerInstantTestRequest
65
+ from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
66
+ from thousandeyes_sdk.instant_tests.models.simple_agent import SimpleAgent
67
+ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test import SipServerInstantTest
68
+ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest
69
+ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_request1 import SipServerInstantTestRequest1
70
+ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse
71
+ from thousandeyes_sdk.instant_tests.models.sip_server_properties import SipServerProperties
72
+ from thousandeyes_sdk.instant_tests.models.sip_test_protocol import SipTestProtocol
73
+ from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent
74
+ from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
75
+ from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders
76
+ from thousandeyes_sdk.instant_tests.models.test_direction import TestDirection
77
+ from thousandeyes_sdk.instant_tests.models.test_dns_server import TestDnsServer
78
+ from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol
79
+ from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId
80
+ from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy
81
+ from thousandeyes_sdk.instant_tests.models.test_label import TestLabel
82
+ from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
83
+ from thousandeyes_sdk.instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy
84
+ from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
85
+ from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
86
+ from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
87
+ from thousandeyes_sdk.instant_tests.models.test_self_link import TestSelfLink
88
+ from thousandeyes_sdk.instant_tests.models.test_sip_credentials import TestSipCredentials
89
+ from thousandeyes_sdk.instant_tests.models.test_ssl_version_id import TestSslVersionId
90
+ from thousandeyes_sdk.instant_tests.models.test_type import TestType
91
+ from thousandeyes_sdk.instant_tests.models.unauthorized_error import UnauthorizedError
92
+ from thousandeyes_sdk.instant_tests.models.unexpanded_instant_test import UnexpandedInstantTest
93
+ from thousandeyes_sdk.instant_tests.models.validation_error import ValidationError
94
+ from thousandeyes_sdk.instant_tests.models.validation_error_item import ValidationErrorItem
95
+ from thousandeyes_sdk.instant_tests.models.voice_instant_test import VoiceInstantTest
96
+ from thousandeyes_sdk.instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest
97
+ from thousandeyes_sdk.instant_tests.models.voice_properties import VoiceProperties
98
+ from thousandeyes_sdk.instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest
99
+ from thousandeyes_sdk.instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest
100
+ from thousandeyes_sdk.instant_tests.models.web_transaction_properties import WebTransactionProperties
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Instant Tests API
5
+
6
+ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test.
7
+
8
+ The version of the OpenAPI document: 7.0.8
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from thousandeyes_sdk.instant_tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class Agent(BaseModel):
27
+ """
28
+ Agent
29
+ """ # noqa: E501
30
+ ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses")
31
+ public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses")
32
+ network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agent’s public IP.")
33
+ agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the agent.", alias="agentId")
34
+ agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
35
+ location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
36
+ country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
37
+ enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
38
+ prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
39
+ verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
40
+ agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
41
+ __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "agentType"]
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ extra="allow",
48
+ )
49
+
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Optional[Self]:
62
+ """Create an instance of Agent from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ * OpenAPI `readOnly` fields are excluded.
75
+ * OpenAPI `readOnly` fields are excluded.
76
+ * OpenAPI `readOnly` fields are excluded.
77
+ * OpenAPI `readOnly` fields are excluded.
78
+ * OpenAPI `readOnly` fields are excluded.
79
+ * OpenAPI `readOnly` fields are excluded.
80
+ * OpenAPI `readOnly` fields are excluded.
81
+ * OpenAPI `readOnly` fields are excluded.
82
+ """
83
+ excluded_fields: Set[str] = set([
84
+ "ip_addresses",
85
+ "public_ip_addresses",
86
+ "network",
87
+ "agent_id",
88
+ "location",
89
+ "country_id",
90
+ "prefix",
91
+ "verify_ssl_certificates",
92
+ ])
93
+
94
+ _dict = self.model_dump(
95
+ by_alias=True,
96
+ exclude=excluded_fields,
97
+ exclude_none=True,
98
+ )
99
+ return _dict
100
+
101
+ @classmethod
102
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
103
+ """Create an instance of Agent from a dict"""
104
+ if obj is None:
105
+ return None
106
+
107
+ if not isinstance(obj, dict):
108
+ return cls.model_validate(obj)
109
+
110
+ _obj = cls.model_validate({
111
+ "ipAddresses": obj.get("ipAddresses"),
112
+ "publicIpAddresses": obj.get("publicIpAddresses"),
113
+ "network": obj.get("network"),
114
+ "agentId": obj.get("agentId"),
115
+ "agentName": obj.get("agentName"),
116
+ "location": obj.get("location"),
117
+ "countryId": obj.get("countryId"),
118
+ "enabled": obj.get("enabled"),
119
+ "prefix": obj.get("prefix"),
120
+ "verifySslCertificates": obj.get("verifySslCertificates"),
121
+ "agentType": obj.get("agentType")
122
+ })
123
+ return _obj
124
+
125
+