thousandeyes-sdk-instant-tests 1.0.0__py3-none-any.whl → 1.2.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 (110) hide show
  1. thousandeyes_sdk/instant_tests/__init__.py +4 -1
  2. thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py +0 -1
  3. thousandeyes_sdk/instant_tests/api/agent_to_server_api.py +0 -1
  4. thousandeyes_sdk/instant_tests/api/api_api.py +0 -1
  5. thousandeyes_sdk/instant_tests/api/dns_security_api.py +0 -1
  6. thousandeyes_sdk/instant_tests/api/dns_server_api.py +0 -1
  7. thousandeyes_sdk/instant_tests/api/dns_trace_api.py +0 -1
  8. thousandeyes_sdk/instant_tests/api/ftp_server_api.py +0 -1
  9. thousandeyes_sdk/instant_tests/api/http_page_load_api.py +0 -1
  10. thousandeyes_sdk/instant_tests/api/http_server_api.py +0 -1
  11. thousandeyes_sdk/instant_tests/api/run_api.py +0 -1
  12. thousandeyes_sdk/instant_tests/api/sip_server_api.py +0 -1
  13. thousandeyes_sdk/instant_tests/api/voice_api.py +0 -1
  14. thousandeyes_sdk/instant_tests/api/web_transaction_api.py +0 -1
  15. thousandeyes_sdk/instant_tests/models/__init__.py +4 -1
  16. thousandeyes_sdk/instant_tests/models/agent.py +0 -1
  17. thousandeyes_sdk/instant_tests/models/agent_base.py +0 -1
  18. thousandeyes_sdk/instant_tests/models/agent_interfaces.py +89 -0
  19. thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +0 -1
  20. thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +0 -1
  21. thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +0 -1
  22. thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +0 -1
  23. thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +0 -1
  24. thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +0 -1
  25. thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +0 -1
  26. thousandeyes_sdk/instant_tests/models/api_instant_test.py +0 -1
  27. thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +0 -1
  28. thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +0 -1
  29. thousandeyes_sdk/instant_tests/models/api_properties.py +0 -1
  30. thousandeyes_sdk/instant_tests/models/api_request.py +0 -1
  31. thousandeyes_sdk/instant_tests/models/api_request_assertion.py +0 -1
  32. thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +0 -1
  33. thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +0 -1
  34. thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +0 -1
  35. thousandeyes_sdk/instant_tests/models/api_request_header.py +0 -1
  36. thousandeyes_sdk/instant_tests/models/api_request_method.py +0 -1
  37. thousandeyes_sdk/instant_tests/models/api_request_variable.py +0 -1
  38. thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +0 -1
  39. thousandeyes_sdk/instant_tests/models/dns_query_class.py +0 -1
  40. thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +0 -1
  41. thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +0 -1
  42. thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +0 -1
  43. thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +0 -1
  44. thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +0 -1
  45. thousandeyes_sdk/instant_tests/models/dns_server_properties.py +0 -1
  46. thousandeyes_sdk/instant_tests/models/dns_servers_request.py +0 -1
  47. thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +0 -1
  48. thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +0 -1
  49. thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +0 -1
  50. thousandeyes_sdk/instant_tests/models/error.py +0 -1
  51. thousandeyes_sdk/instant_tests/models/expand.py +0 -1
  52. thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +0 -1
  53. thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +0 -1
  54. thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +0 -1
  55. thousandeyes_sdk/instant_tests/models/http_server_base_properties.py +173 -0
  56. thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +21 -8
  57. thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +21 -8
  58. thousandeyes_sdk/instant_tests/models/http_server_properties.py +21 -8
  59. thousandeyes_sdk/instant_tests/models/instant_test.py +0 -1
  60. thousandeyes_sdk/instant_tests/models/instant_test_request.py +0 -1
  61. thousandeyes_sdk/instant_tests/models/link.py +0 -1
  62. thousandeyes_sdk/instant_tests/models/o_auth.py +103 -0
  63. thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +35 -18
  64. thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +35 -18
  65. thousandeyes_sdk/instant_tests/models/page_load_properties.py +36 -19
  66. thousandeyes_sdk/instant_tests/models/request_method.py +41 -0
  67. thousandeyes_sdk/instant_tests/models/server_instant_test_request.py +0 -1
  68. thousandeyes_sdk/instant_tests/models/shared_with_account.py +0 -1
  69. thousandeyes_sdk/instant_tests/models/simple_agent.py +0 -1
  70. thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +0 -1
  71. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +0 -1
  72. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py +0 -1
  73. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +0 -1
  74. thousandeyes_sdk/instant_tests/models/sip_server_properties.py +0 -1
  75. thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +0 -1
  76. thousandeyes_sdk/instant_tests/models/test_agent.py +0 -1
  77. thousandeyes_sdk/instant_tests/models/test_auth_type.py +0 -1
  78. thousandeyes_sdk/instant_tests/models/test_custom_headers.py +0 -1
  79. thousandeyes_sdk/instant_tests/models/test_direction.py +0 -1
  80. thousandeyes_sdk/instant_tests/models/test_dns_server.py +0 -1
  81. thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +0 -1
  82. thousandeyes_sdk/instant_tests/models/test_dscp_id.py +0 -1
  83. thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +0 -1
  84. thousandeyes_sdk/instant_tests/models/test_label.py +0 -1
  85. thousandeyes_sdk/instant_tests/models/test_links.py +0 -1
  86. thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +0 -1
  87. thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +0 -1
  88. thousandeyes_sdk/instant_tests/models/test_probe_mode.py +0 -1
  89. thousandeyes_sdk/instant_tests/models/test_protocol.py +0 -1
  90. thousandeyes_sdk/instant_tests/models/test_self_link.py +0 -1
  91. thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +0 -1
  92. thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +0 -1
  93. thousandeyes_sdk/instant_tests/models/test_type.py +0 -1
  94. thousandeyes_sdk/instant_tests/models/unauthorized_error.py +0 -1
  95. thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +0 -1
  96. thousandeyes_sdk/instant_tests/models/validation_error.py +0 -1
  97. thousandeyes_sdk/instant_tests/models/validation_error_item.py +0 -1
  98. thousandeyes_sdk/instant_tests/models/voice_instant_test.py +0 -1
  99. thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +0 -1
  100. thousandeyes_sdk/instant_tests/models/voice_properties.py +0 -1
  101. thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +37 -20
  102. thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +37 -20
  103. thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +38 -21
  104. {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/METADATA +6 -2
  105. thousandeyes_sdk_instant_tests-1.2.0.dist-info/RECORD +111 -0
  106. {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/WHEEL +1 -1
  107. thousandeyes_sdk_instant_tests-1.0.0.dist-info/RECORD +0 -107
  108. {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/LICENSE +0 -0
  109. {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/NOTICE +0 -0
  110. {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,103 @@
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
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+
14
+ from __future__ import annotations
15
+ import pprint
16
+ import re # noqa: F401
17
+ import json
18
+
19
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
20
+ from typing import Any, ClassVar, Dict, List, Optional
21
+ from thousandeyes_sdk.instant_tests.models.request_method import RequestMethod
22
+ from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class OAuth(BaseModel):
27
+ """
28
+ Use this only if you want to use OAuth as the authentication mechanism.
29
+ """ # noqa: E501
30
+ config_id: Optional[StrictStr] = Field(default=None, description="The ID of the OAuth configuration.", alias="configId")
31
+ test_url: Optional[StrictStr] = Field(default=None, description="Target for the test.", alias="testUrl")
32
+ request_method: Optional[RequestMethod] = Field(default=None, alias="requestMethod")
33
+ post_body: Optional[StrictStr] = Field(default=None, description="Enter the OAuth body for the HTTP POST request in this field when using OAuth as the authentication mechanism. No special escaping is required. If content is provided in the post body, the `requestMethod` is automatically set to POST.", alias="postBody")
34
+ headers: Optional[StrictStr] = Field(default=None, description="Request headers used for OAuth.")
35
+ auth_type: Optional[TestAuthType] = Field(default=None, alias="authType")
36
+ username: Optional[StrictStr] = Field(default=None, description="OAuth username")
37
+ password: Optional[StrictStr] = Field(default=None, description="OAuth password")
38
+ __properties: ClassVar[List[str]] = ["configId", "testUrl", "requestMethod", "postBody", "headers", "authType", "username", "password"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ extra="allow",
45
+ )
46
+
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.model_dump(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of OAuth from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
68
+ * `None` is only added to the output dict for nullable fields that
69
+ were set at model initialization. Other fields with value `None`
70
+ are ignored.
71
+ """
72
+ excluded_fields: Set[str] = set([
73
+ ])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of OAuth from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "configId": obj.get("configId"),
93
+ "testUrl": obj.get("testUrl"),
94
+ "requestMethod": obj.get("requestMethod"),
95
+ "postBody": obj.get("postBody"),
96
+ "headers": obj.get("headers"),
97
+ "authType": obj.get("authType"),
98
+ "username": obj.get("username"),
99
+ "password": obj.get("password")
100
+ })
101
+ return _obj
102
+
103
+
@@ -5,7 +5,6 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 7.0.8
9
8
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
9
 
11
10
  Do not edit the class manually.
@@ -18,10 +17,12 @@ import re # noqa: F401
18
17
  import json
19
18
 
20
19
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
22
21
  from typing import Any, ClassVar, Dict, List, Optional
23
22
  from typing_extensions import Annotated
24
23
  from thousandeyes_sdk.instant_tests.models.agent import Agent
24
+ from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces
25
+ from thousandeyes_sdk.instant_tests.models.o_auth import OAuth
25
26
  from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
26
27
  from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
27
28
  from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders
@@ -53,13 +54,14 @@ class PageLoadInstantTest(BaseModel):
53
54
  labels: Optional[List[TestLabel]] = None
54
55
  shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
55
56
  auth_type: Optional[TestAuthType] = Field(default=None, alias="authType")
57
+ agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces")
56
58
  bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements")
57
59
  client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate")
58
- content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex")
60
+ content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
59
61
  custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
60
62
  desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
61
- emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId")
62
- follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
63
+ download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
64
+ dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride")
63
65
  http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime")
64
66
  http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit")
65
67
  http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion")
@@ -67,8 +69,7 @@ class PageLoadInstantTest(BaseModel):
67
69
  mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
68
70
  network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements")
69
71
  num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces")
70
- page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
71
- page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
72
+ o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
72
73
  password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
73
74
  path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
74
75
  probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
@@ -81,17 +82,22 @@ class PageLoadInstantTest(BaseModel):
81
82
  username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.")
82
83
  verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate")
83
84
  allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation")
85
+ follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
86
+ fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
87
+ override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
88
+ override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
89
+ collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
90
+ emulated_device_id: Optional[StrictStr] = Field(default=None, description="ID of the emulated device, if one was given when the test was created.", alias="emulatedDeviceId")
91
+ page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
92
+ page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
84
93
  block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains")
85
94
  disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot")
86
95
  allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera")
87
96
  allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation")
88
97
  browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage")
89
98
  page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy")
90
- fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
91
- override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
92
- override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
93
99
  agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
94
- __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "emulatedDeviceId", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "agents"]
100
+ __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "agents"]
95
101
 
96
102
  model_config = ConfigDict(
97
103
  populate_by_name=True,
@@ -174,9 +180,15 @@ class PageLoadInstantTest(BaseModel):
174
180
  if _item:
175
181
  _items.append(_item.to_dict())
176
182
  _dict['sharedWithAccounts'] = _items
183
+ # override the default output from pydantic by calling `to_dict()` of agent_interfaces
184
+ if self.agent_interfaces:
185
+ _dict['agentInterfaces'] = self.agent_interfaces.to_dict()
177
186
  # override the default output from pydantic by calling `to_dict()` of custom_headers
178
187
  if self.custom_headers:
179
188
  _dict['customHeaders'] = self.custom_headers.to_dict()
189
+ # override the default output from pydantic by calling `to_dict()` of o_auth
190
+ if self.o_auth:
191
+ _dict['oAuth'] = self.o_auth.to_dict()
180
192
  # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
181
193
  _items = []
182
194
  if self.agents:
@@ -210,13 +222,14 @@ class PageLoadInstantTest(BaseModel):
210
222
  "labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
211
223
  "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
212
224
  "authType": obj.get("authType"),
225
+ "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
213
226
  "bandwidthMeasurements": obj.get("bandwidthMeasurements"),
214
227
  "clientCertificate": obj.get("clientCertificate"),
215
228
  "contentRegex": obj.get("contentRegex"),
216
229
  "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
217
230
  "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
218
- "emulatedDeviceId": obj.get("emulatedDeviceId"),
219
- "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
231
+ "downloadLimit": obj.get("downloadLimit"),
232
+ "dnsOverride": obj.get("dnsOverride"),
220
233
  "httpTargetTime": obj.get("httpTargetTime"),
221
234
  "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5,
222
235
  "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2,
@@ -224,8 +237,7 @@ class PageLoadInstantTest(BaseModel):
224
237
  "mtuMeasurements": obj.get("mtuMeasurements"),
225
238
  "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
226
239
  "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
227
- "pageLoadTargetTime": obj.get("pageLoadTargetTime"),
228
- "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
240
+ "oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
229
241
  "password": obj.get("password"),
230
242
  "pathTraceMode": obj.get("pathTraceMode"),
231
243
  "probeMode": obj.get("probeMode"),
@@ -238,15 +250,20 @@ class PageLoadInstantTest(BaseModel):
238
250
  "username": obj.get("username"),
239
251
  "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
240
252
  "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
253
+ "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
254
+ "fixedPacketRate": obj.get("fixedPacketRate"),
255
+ "overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
256
+ "overrideProxyId": obj.get("overrideProxyId"),
257
+ "collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
258
+ "emulatedDeviceId": obj.get("emulatedDeviceId"),
259
+ "pageLoadTargetTime": obj.get("pageLoadTargetTime"),
260
+ "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
241
261
  "blockDomains": obj.get("blockDomains"),
242
262
  "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False,
243
263
  "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False,
244
264
  "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False,
245
265
  "browserLanguage": obj.get("browserLanguage"),
246
266
  "pageLoadingStrategy": obj.get("pageLoadingStrategy"),
247
- "fixedPacketRate": obj.get("fixedPacketRate"),
248
- "overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
249
- "overrideProxyId": obj.get("overrideProxyId"),
250
267
  "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
251
268
  })
252
269
  return _obj
@@ -5,7 +5,6 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 7.0.8
9
8
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
9
 
11
10
  Do not edit the class manually.
@@ -18,9 +17,11 @@ import re # noqa: F401
18
17
  import json
19
18
 
20
19
  from datetime import datetime
21
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
22
21
  from typing import Any, ClassVar, Dict, List, Optional
23
22
  from typing_extensions import Annotated
23
+ from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces
24
+ from thousandeyes_sdk.instant_tests.models.o_auth import OAuth
24
25
  from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent
25
26
  from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
26
27
  from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders
@@ -51,13 +52,14 @@ class PageLoadInstantTestRequest(BaseModel):
51
52
  labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).")
52
53
  shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts")
53
54
  auth_type: Optional[TestAuthType] = Field(default=None, alias="authType")
55
+ agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces")
54
56
  bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements")
55
57
  client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate")
56
- content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex")
58
+ content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
57
59
  custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
58
60
  desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
59
- emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId")
60
- follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
61
+ download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
62
+ dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride")
61
63
  http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime")
62
64
  http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit")
63
65
  http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion")
@@ -65,8 +67,7 @@ class PageLoadInstantTestRequest(BaseModel):
65
67
  mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
66
68
  network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements")
67
69
  num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces")
68
- page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
69
- page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
70
+ o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
70
71
  password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
71
72
  path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
72
73
  probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
@@ -79,17 +80,22 @@ class PageLoadInstantTestRequest(BaseModel):
79
80
  username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.")
80
81
  verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate")
81
82
  allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation")
83
+ follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
84
+ fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
85
+ override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
86
+ override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
87
+ collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
88
+ emulated_device_id: Optional[StrictStr] = Field(default=None, description="ID of the emulated device, if one was given when the test was created.", alias="emulatedDeviceId")
89
+ page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
90
+ page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
82
91
  block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains")
83
92
  disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot")
84
93
  allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera")
85
94
  allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation")
86
95
  browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage")
87
96
  page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy")
88
- fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
89
- override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
90
- override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
91
97
  agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
92
- __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "emulatedDeviceId", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "agents"]
98
+ __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "agents"]
93
99
 
94
100
  model_config = ConfigDict(
95
101
  populate_by_name=True,
@@ -152,9 +158,15 @@ class PageLoadInstantTestRequest(BaseModel):
152
158
  # override the default output from pydantic by calling `to_dict()` of links
153
159
  if self.links:
154
160
  _dict['_links'] = self.links.to_dict()
161
+ # override the default output from pydantic by calling `to_dict()` of agent_interfaces
162
+ if self.agent_interfaces:
163
+ _dict['agentInterfaces'] = self.agent_interfaces.to_dict()
155
164
  # override the default output from pydantic by calling `to_dict()` of custom_headers
156
165
  if self.custom_headers:
157
166
  _dict['customHeaders'] = self.custom_headers.to_dict()
167
+ # override the default output from pydantic by calling `to_dict()` of o_auth
168
+ if self.o_auth:
169
+ _dict['oAuth'] = self.o_auth.to_dict()
158
170
  # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
159
171
  _items = []
160
172
  if self.agents:
@@ -188,13 +200,14 @@ class PageLoadInstantTestRequest(BaseModel):
188
200
  "labels": obj.get("labels"),
189
201
  "sharedWithAccounts": obj.get("sharedWithAccounts"),
190
202
  "authType": obj.get("authType"),
203
+ "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
191
204
  "bandwidthMeasurements": obj.get("bandwidthMeasurements"),
192
205
  "clientCertificate": obj.get("clientCertificate"),
193
206
  "contentRegex": obj.get("contentRegex"),
194
207
  "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
195
208
  "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
196
- "emulatedDeviceId": obj.get("emulatedDeviceId"),
197
- "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
209
+ "downloadLimit": obj.get("downloadLimit"),
210
+ "dnsOverride": obj.get("dnsOverride"),
198
211
  "httpTargetTime": obj.get("httpTargetTime"),
199
212
  "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5,
200
213
  "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2,
@@ -202,8 +215,7 @@ class PageLoadInstantTestRequest(BaseModel):
202
215
  "mtuMeasurements": obj.get("mtuMeasurements"),
203
216
  "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
204
217
  "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
205
- "pageLoadTargetTime": obj.get("pageLoadTargetTime"),
206
- "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
218
+ "oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
207
219
  "password": obj.get("password"),
208
220
  "pathTraceMode": obj.get("pathTraceMode"),
209
221
  "probeMode": obj.get("probeMode"),
@@ -216,15 +228,20 @@ class PageLoadInstantTestRequest(BaseModel):
216
228
  "username": obj.get("username"),
217
229
  "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
218
230
  "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
231
+ "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
232
+ "fixedPacketRate": obj.get("fixedPacketRate"),
233
+ "overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
234
+ "overrideProxyId": obj.get("overrideProxyId"),
235
+ "collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
236
+ "emulatedDeviceId": obj.get("emulatedDeviceId"),
237
+ "pageLoadTargetTime": obj.get("pageLoadTargetTime"),
238
+ "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
219
239
  "blockDomains": obj.get("blockDomains"),
220
240
  "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False,
221
241
  "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False,
222
242
  "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False,
223
243
  "browserLanguage": obj.get("browserLanguage"),
224
244
  "pageLoadingStrategy": obj.get("pageLoadingStrategy"),
225
- "fixedPacketRate": obj.get("fixedPacketRate"),
226
- "overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
227
- "overrideProxyId": obj.get("overrideProxyId"),
228
245
  "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
229
246
  })
230
247
  return _obj
@@ -5,7 +5,6 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 7.0.8
9
8
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
9
 
11
10
  Do not edit the class manually.
@@ -17,9 +16,11 @@ import pprint
17
16
  import re # noqa: F401
18
17
  import json
19
18
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
19
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
20
  from typing import Any, ClassVar, Dict, List, Optional
22
21
  from typing_extensions import Annotated
22
+ from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces
23
+ from thousandeyes_sdk.instant_tests.models.o_auth import OAuth
23
24
  from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
24
25
  from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders
25
26
  from thousandeyes_sdk.instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy
@@ -35,13 +36,14 @@ class PageLoadProperties(BaseModel):
35
36
  PageLoadProperties
36
37
  """ # noqa: E501
37
38
  auth_type: Optional[TestAuthType] = Field(default=None, alias="authType")
39
+ agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces")
38
40
  bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements")
39
41
  client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate")
40
- content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex")
42
+ content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
41
43
  custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
42
44
  desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
43
- emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId")
44
- follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
45
+ download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
46
+ dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride")
45
47
  http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime")
46
48
  http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit")
47
49
  http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion")
@@ -49,8 +51,7 @@ class PageLoadProperties(BaseModel):
49
51
  mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
50
52
  network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements")
51
53
  num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces")
52
- page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
53
- page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
54
+ o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
54
55
  password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
55
56
  path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
56
57
  probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
@@ -63,17 +64,22 @@ class PageLoadProperties(BaseModel):
63
64
  username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.")
64
65
  verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate")
65
66
  allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation")
67
+ follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
68
+ fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
69
+ override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
70
+ override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
71
+ collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
72
+ emulated_device_id: Optional[StrictStr] = Field(default=None, description="ID of the emulated device, if one was given when the test was created.", alias="emulatedDeviceId")
73
+ page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
74
+ page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
66
75
  block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains")
67
76
  disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot")
68
77
  allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera")
69
78
  allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation")
70
79
  browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage")
71
80
  page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy")
72
- fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
73
81
  type: Optional[StrictStr] = None
74
- override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
75
- override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
76
- __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "emulatedDeviceId", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "type", "overrideAgentProxy", "overrideProxyId"]
82
+ __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "type"]
77
83
 
78
84
  model_config = ConfigDict(
79
85
  populate_by_name=True,
@@ -119,9 +125,15 @@ class PageLoadProperties(BaseModel):
119
125
  exclude=excluded_fields,
120
126
  exclude_none=True,
121
127
  )
128
+ # override the default output from pydantic by calling `to_dict()` of agent_interfaces
129
+ if self.agent_interfaces:
130
+ _dict['agentInterfaces'] = self.agent_interfaces.to_dict()
122
131
  # override the default output from pydantic by calling `to_dict()` of custom_headers
123
132
  if self.custom_headers:
124
133
  _dict['customHeaders'] = self.custom_headers.to_dict()
134
+ # override the default output from pydantic by calling `to_dict()` of o_auth
135
+ if self.o_auth:
136
+ _dict['oAuth'] = self.o_auth.to_dict()
125
137
  return _dict
126
138
 
127
139
  @classmethod
@@ -135,13 +147,14 @@ class PageLoadProperties(BaseModel):
135
147
 
136
148
  _obj = cls.model_validate({
137
149
  "authType": obj.get("authType"),
150
+ "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
138
151
  "bandwidthMeasurements": obj.get("bandwidthMeasurements"),
139
152
  "clientCertificate": obj.get("clientCertificate"),
140
153
  "contentRegex": obj.get("contentRegex"),
141
154
  "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
142
155
  "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
143
- "emulatedDeviceId": obj.get("emulatedDeviceId"),
144
- "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
156
+ "downloadLimit": obj.get("downloadLimit"),
157
+ "dnsOverride": obj.get("dnsOverride"),
145
158
  "httpTargetTime": obj.get("httpTargetTime"),
146
159
  "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5,
147
160
  "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2,
@@ -149,8 +162,7 @@ class PageLoadProperties(BaseModel):
149
162
  "mtuMeasurements": obj.get("mtuMeasurements"),
150
163
  "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
151
164
  "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
152
- "pageLoadTargetTime": obj.get("pageLoadTargetTime"),
153
- "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
165
+ "oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
154
166
  "password": obj.get("password"),
155
167
  "pathTraceMode": obj.get("pathTraceMode"),
156
168
  "probeMode": obj.get("probeMode"),
@@ -163,16 +175,21 @@ class PageLoadProperties(BaseModel):
163
175
  "username": obj.get("username"),
164
176
  "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
165
177
  "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
178
+ "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
179
+ "fixedPacketRate": obj.get("fixedPacketRate"),
180
+ "overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
181
+ "overrideProxyId": obj.get("overrideProxyId"),
182
+ "collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
183
+ "emulatedDeviceId": obj.get("emulatedDeviceId"),
184
+ "pageLoadTargetTime": obj.get("pageLoadTargetTime"),
185
+ "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
166
186
  "blockDomains": obj.get("blockDomains"),
167
187
  "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False,
168
188
  "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False,
169
189
  "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False,
170
190
  "browserLanguage": obj.get("browserLanguage"),
171
191
  "pageLoadingStrategy": obj.get("pageLoadingStrategy"),
172
- "fixedPacketRate": obj.get("fixedPacketRate"),
173
- "type": obj.get("type"),
174
- "overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
175
- "overrideProxyId": obj.get("overrideProxyId")
192
+ "type": obj.get("type")
176
193
  })
177
194
  return _obj
178
195
 
@@ -0,0 +1,41 @@
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
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+
14
+ from __future__ import annotations
15
+ import json
16
+ from enum import Enum
17
+ from typing_extensions import Self
18
+
19
+
20
+ class RequestMethod(str, Enum):
21
+ """
22
+ HTTP request method.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ GET = 'get'
29
+ POST = 'post'
30
+ PUT = 'put'
31
+ DELETE = 'delete'
32
+ PATCH = 'patch'
33
+ OPTIONS = 'options'
34
+ TRACE = 'trace'
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of RequestMethod from a JSON string"""
39
+ return cls(json.loads(json_str))
40
+
41
+