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.
- thousandeyes_sdk/instant_tests/__init__.py +4 -1
- thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/agent_to_server_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/api_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/dns_security_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/dns_server_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/dns_trace_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/ftp_server_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/http_page_load_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/http_server_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/run_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/sip_server_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/voice_api.py +0 -1
- thousandeyes_sdk/instant_tests/api/web_transaction_api.py +0 -1
- thousandeyes_sdk/instant_tests/models/__init__.py +4 -1
- thousandeyes_sdk/instant_tests/models/agent.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_base.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_interfaces.py +89 -0
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_assertion.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_header.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_method.py +0 -1
- thousandeyes_sdk/instant_tests/models/api_request_variable.py +0 -1
- thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_query_class.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_server_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_servers_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/error.py +0 -1
- thousandeyes_sdk/instant_tests/models/expand.py +0 -1
- thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +0 -1
- thousandeyes_sdk/instant_tests/models/http_server_base_properties.py +173 -0
- thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +21 -8
- thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +21 -8
- thousandeyes_sdk/instant_tests/models/http_server_properties.py +21 -8
- thousandeyes_sdk/instant_tests/models/instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/link.py +0 -1
- thousandeyes_sdk/instant_tests/models/o_auth.py +103 -0
- thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +35 -18
- thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +35 -18
- thousandeyes_sdk/instant_tests/models/page_load_properties.py +36 -19
- thousandeyes_sdk/instant_tests/models/request_method.py +41 -0
- thousandeyes_sdk/instant_tests/models/server_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/shared_with_account.py +0 -1
- thousandeyes_sdk/instant_tests/models/simple_agent.py +0 -1
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py +0 -1
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +0 -1
- thousandeyes_sdk/instant_tests/models/sip_server_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_agent.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_auth_type.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_custom_headers.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_direction.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_dns_server.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_dscp_id.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_label.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_links.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_probe_mode.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_protocol.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_self_link.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +0 -1
- thousandeyes_sdk/instant_tests/models/test_type.py +0 -1
- thousandeyes_sdk/instant_tests/models/unauthorized_error.py +0 -1
- thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/validation_error.py +0 -1
- thousandeyes_sdk/instant_tests/models/validation_error_item.py +0 -1
- thousandeyes_sdk/instant_tests/models/voice_instant_test.py +0 -1
- thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +0 -1
- thousandeyes_sdk/instant_tests/models/voice_properties.py +0 -1
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +37 -20
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +37 -20
- thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +38 -21
- {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/METADATA +6 -2
- thousandeyes_sdk_instant_tests-1.2.0.dist-info/RECORD +111 -0
- {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/WHEEL +1 -1
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/RECORD +0 -107
- {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/LICENSE +0 -0
- {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/NOTICE +0 -0
- {thousandeyes_sdk_instant_tests-1.0.0.dist-info → thousandeyes_sdk_instant_tests-1.2.0.dist-info}/top_level.txt +0 -0
@@ -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.
|
@@ -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.
|
@@ -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.
|
@@ -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.
|
@@ -0,0 +1,173 @@
|
|
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, StrictBool, StrictInt, StrictStr
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
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
|
24
|
+
from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
|
25
|
+
from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders
|
26
|
+
from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
|
27
|
+
from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
|
28
|
+
from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
|
29
|
+
from thousandeyes_sdk.instant_tests.models.test_ssl_version_id import TestSslVersionId
|
30
|
+
from typing import Optional, Set
|
31
|
+
from typing_extensions import Self
|
32
|
+
|
33
|
+
class HttpServerBaseProperties(BaseModel):
|
34
|
+
"""
|
35
|
+
HttpServerBaseProperties
|
36
|
+
""" # noqa: E501
|
37
|
+
auth_type: Optional[TestAuthType] = Field(default=None, alias="authType")
|
38
|
+
agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces")
|
39
|
+
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")
|
40
|
+
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")
|
41
|
+
content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
|
42
|
+
custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
|
43
|
+
desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
|
44
|
+
download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
|
45
|
+
dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride")
|
46
|
+
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")
|
47
|
+
http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit")
|
48
|
+
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
|
+
include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders")
|
50
|
+
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
51
|
+
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")
|
52
|
+
num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces")
|
53
|
+
o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
|
54
|
+
password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
|
55
|
+
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
56
|
+
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
57
|
+
protocol: Optional[TestProtocol] = None
|
58
|
+
ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion")
|
59
|
+
ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId")
|
60
|
+
url: Optional[StrictStr] = Field(default=None, description="Target for the test.")
|
61
|
+
use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm")
|
62
|
+
user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent")
|
63
|
+
username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.")
|
64
|
+
verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate")
|
65
|
+
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")
|
66
|
+
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")
|
67
|
+
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")
|
68
|
+
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")
|
69
|
+
override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
|
70
|
+
collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
|
71
|
+
__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"]
|
72
|
+
|
73
|
+
model_config = ConfigDict(
|
74
|
+
populate_by_name=True,
|
75
|
+
validate_assignment=True,
|
76
|
+
protected_namespaces=(),
|
77
|
+
extra="allow",
|
78
|
+
)
|
79
|
+
|
80
|
+
|
81
|
+
def to_str(self) -> str:
|
82
|
+
"""Returns the string representation of the model using alias"""
|
83
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
84
|
+
|
85
|
+
def to_json(self) -> str:
|
86
|
+
"""Returns the JSON representation of the model using alias"""
|
87
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
88
|
+
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
89
|
+
|
90
|
+
@classmethod
|
91
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
92
|
+
"""Create an instance of HttpServerBaseProperties from a JSON string"""
|
93
|
+
return cls.from_dict(json.loads(json_str))
|
94
|
+
|
95
|
+
def to_dict(self) -> Dict[str, Any]:
|
96
|
+
"""Return the dictionary representation of the model using alias.
|
97
|
+
|
98
|
+
This has the following differences from calling pydantic's
|
99
|
+
`self.model_dump(by_alias=True)`:
|
100
|
+
|
101
|
+
* `None` is only added to the output dict for nullable fields that
|
102
|
+
were set at model initialization. Other fields with value `None`
|
103
|
+
are ignored.
|
104
|
+
* OpenAPI `readOnly` fields are excluded.
|
105
|
+
"""
|
106
|
+
excluded_fields: Set[str] = set([
|
107
|
+
"ssl_version",
|
108
|
+
])
|
109
|
+
|
110
|
+
_dict = self.model_dump(
|
111
|
+
by_alias=True,
|
112
|
+
exclude=excluded_fields,
|
113
|
+
exclude_none=True,
|
114
|
+
)
|
115
|
+
# override the default output from pydantic by calling `to_dict()` of agent_interfaces
|
116
|
+
if self.agent_interfaces:
|
117
|
+
_dict['agentInterfaces'] = self.agent_interfaces.to_dict()
|
118
|
+
# override the default output from pydantic by calling `to_dict()` of custom_headers
|
119
|
+
if self.custom_headers:
|
120
|
+
_dict['customHeaders'] = self.custom_headers.to_dict()
|
121
|
+
# override the default output from pydantic by calling `to_dict()` of o_auth
|
122
|
+
if self.o_auth:
|
123
|
+
_dict['oAuth'] = self.o_auth.to_dict()
|
124
|
+
return _dict
|
125
|
+
|
126
|
+
@classmethod
|
127
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
128
|
+
"""Create an instance of HttpServerBaseProperties from a dict"""
|
129
|
+
if obj is None:
|
130
|
+
return None
|
131
|
+
|
132
|
+
if not isinstance(obj, dict):
|
133
|
+
return cls.model_validate(obj)
|
134
|
+
|
135
|
+
_obj = cls.model_validate({
|
136
|
+
"authType": obj.get("authType"),
|
137
|
+
"agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
|
138
|
+
"bandwidthMeasurements": obj.get("bandwidthMeasurements"),
|
139
|
+
"clientCertificate": obj.get("clientCertificate"),
|
140
|
+
"contentRegex": obj.get("contentRegex"),
|
141
|
+
"customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
|
142
|
+
"desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
|
143
|
+
"downloadLimit": obj.get("downloadLimit"),
|
144
|
+
"dnsOverride": obj.get("dnsOverride"),
|
145
|
+
"httpTargetTime": obj.get("httpTargetTime"),
|
146
|
+
"httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5,
|
147
|
+
"httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2,
|
148
|
+
"includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True,
|
149
|
+
"mtuMeasurements": obj.get("mtuMeasurements"),
|
150
|
+
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
151
|
+
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
152
|
+
"oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
|
153
|
+
"password": obj.get("password"),
|
154
|
+
"pathTraceMode": obj.get("pathTraceMode"),
|
155
|
+
"probeMode": obj.get("probeMode"),
|
156
|
+
"protocol": obj.get("protocol"),
|
157
|
+
"sslVersion": obj.get("sslVersion"),
|
158
|
+
"sslVersionId": obj.get("sslVersionId"),
|
159
|
+
"url": obj.get("url"),
|
160
|
+
"useNtlm": obj.get("useNtlm"),
|
161
|
+
"userAgent": obj.get("userAgent"),
|
162
|
+
"username": obj.get("username"),
|
163
|
+
"verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
|
164
|
+
"allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
|
165
|
+
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
166
|
+
"fixedPacketRate": obj.get("fixedPacketRate"),
|
167
|
+
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
168
|
+
"overrideProxyId": obj.get("overrideProxyId"),
|
169
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False
|
170
|
+
})
|
171
|
+
return _obj
|
172
|
+
|
173
|
+
|
@@ -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.
|
@@ -22,6 +21,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, Strict
|
|
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,10 +54,10 @@ class HttpServerInstantTest(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
60
|
content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
|
59
|
-
headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.")
|
60
61
|
custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
|
61
62
|
desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
|
62
63
|
download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
|
@@ -68,9 +69,9 @@ class HttpServerInstantTest(BaseModel):
|
|
68
69
|
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
69
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")
|
70
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")
|
72
|
+
o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
|
71
73
|
password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
|
72
74
|
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
73
|
-
post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody")
|
74
75
|
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
75
76
|
protocol: Optional[TestProtocol] = None
|
76
77
|
ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion")
|
@@ -81,13 +82,16 @@ class HttpServerInstantTest(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")
|
84
|
-
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
85
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
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
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
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
|
+
headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.")
|
91
|
+
post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody")
|
92
|
+
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
89
93
|
agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
|
90
|
-
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "
|
94
|
+
__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", "headers", "postBody", "ipv6Policy", "agents"]
|
91
95
|
|
92
96
|
model_config = ConfigDict(
|
93
97
|
populate_by_name=True,
|
@@ -170,9 +174,15 @@ class HttpServerInstantTest(BaseModel):
|
|
170
174
|
if _item:
|
171
175
|
_items.append(_item.to_dict())
|
172
176
|
_dict['sharedWithAccounts'] = _items
|
177
|
+
# override the default output from pydantic by calling `to_dict()` of agent_interfaces
|
178
|
+
if self.agent_interfaces:
|
179
|
+
_dict['agentInterfaces'] = self.agent_interfaces.to_dict()
|
173
180
|
# override the default output from pydantic by calling `to_dict()` of custom_headers
|
174
181
|
if self.custom_headers:
|
175
182
|
_dict['customHeaders'] = self.custom_headers.to_dict()
|
183
|
+
# override the default output from pydantic by calling `to_dict()` of o_auth
|
184
|
+
if self.o_auth:
|
185
|
+
_dict['oAuth'] = self.o_auth.to_dict()
|
176
186
|
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
177
187
|
_items = []
|
178
188
|
if self.agents:
|
@@ -206,10 +216,10 @@ class HttpServerInstantTest(BaseModel):
|
|
206
216
|
"labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
207
217
|
"sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
|
208
218
|
"authType": obj.get("authType"),
|
219
|
+
"agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
|
209
220
|
"bandwidthMeasurements": obj.get("bandwidthMeasurements"),
|
210
221
|
"clientCertificate": obj.get("clientCertificate"),
|
211
222
|
"contentRegex": obj.get("contentRegex"),
|
212
|
-
"headers": obj.get("headers"),
|
213
223
|
"customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
|
214
224
|
"desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
|
215
225
|
"downloadLimit": obj.get("downloadLimit"),
|
@@ -221,9 +231,9 @@ class HttpServerInstantTest(BaseModel):
|
|
221
231
|
"mtuMeasurements": obj.get("mtuMeasurements"),
|
222
232
|
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
223
233
|
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
234
|
+
"oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
|
224
235
|
"password": obj.get("password"),
|
225
236
|
"pathTraceMode": obj.get("pathTraceMode"),
|
226
|
-
"postBody": obj.get("postBody"),
|
227
237
|
"probeMode": obj.get("probeMode"),
|
228
238
|
"protocol": obj.get("protocol"),
|
229
239
|
"sslVersion": obj.get("sslVersion"),
|
@@ -234,11 +244,14 @@ class HttpServerInstantTest(BaseModel):
|
|
234
244
|
"username": obj.get("username"),
|
235
245
|
"verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
|
236
246
|
"allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
|
237
|
-
"ipv6Policy": obj.get("ipv6Policy"),
|
238
247
|
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
239
248
|
"fixedPacketRate": obj.get("fixedPacketRate"),
|
240
249
|
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
241
250
|
"overrideProxyId": obj.get("overrideProxyId"),
|
251
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
|
252
|
+
"headers": obj.get("headers"),
|
253
|
+
"postBody": obj.get("postBody"),
|
254
|
+
"ipv6Policy": obj.get("ipv6Policy"),
|
242
255
|
"agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
243
256
|
})
|
244
257
|
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.
|
@@ -21,6 +20,8 @@ from datetime import datetime
|
|
21
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,10 +52,10 @@ class HttpServerInstantTestRequest(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
58
|
content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
|
57
|
-
headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.")
|
58
59
|
custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
|
59
60
|
desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
|
60
61
|
download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
|
@@ -66,9 +67,9 @@ class HttpServerInstantTestRequest(BaseModel):
|
|
66
67
|
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
67
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")
|
68
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")
|
70
|
+
o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
|
69
71
|
password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
|
70
72
|
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
71
|
-
post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody")
|
72
73
|
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
73
74
|
protocol: Optional[TestProtocol] = None
|
74
75
|
ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion")
|
@@ -79,13 +80,16 @@ class HttpServerInstantTestRequest(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")
|
82
|
-
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
83
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
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
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
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
|
+
headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.")
|
89
|
+
post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody")
|
90
|
+
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
87
91
|
agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
|
88
|
-
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "
|
92
|
+
__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", "headers", "postBody", "ipv6Policy", "agents"]
|
89
93
|
|
90
94
|
model_config = ConfigDict(
|
91
95
|
populate_by_name=True,
|
@@ -148,9 +152,15 @@ class HttpServerInstantTestRequest(BaseModel):
|
|
148
152
|
# override the default output from pydantic by calling `to_dict()` of links
|
149
153
|
if self.links:
|
150
154
|
_dict['_links'] = self.links.to_dict()
|
155
|
+
# override the default output from pydantic by calling `to_dict()` of agent_interfaces
|
156
|
+
if self.agent_interfaces:
|
157
|
+
_dict['agentInterfaces'] = self.agent_interfaces.to_dict()
|
151
158
|
# override the default output from pydantic by calling `to_dict()` of custom_headers
|
152
159
|
if self.custom_headers:
|
153
160
|
_dict['customHeaders'] = self.custom_headers.to_dict()
|
161
|
+
# override the default output from pydantic by calling `to_dict()` of o_auth
|
162
|
+
if self.o_auth:
|
163
|
+
_dict['oAuth'] = self.o_auth.to_dict()
|
154
164
|
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
155
165
|
_items = []
|
156
166
|
if self.agents:
|
@@ -184,10 +194,10 @@ class HttpServerInstantTestRequest(BaseModel):
|
|
184
194
|
"labels": obj.get("labels"),
|
185
195
|
"sharedWithAccounts": obj.get("sharedWithAccounts"),
|
186
196
|
"authType": obj.get("authType"),
|
197
|
+
"agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
|
187
198
|
"bandwidthMeasurements": obj.get("bandwidthMeasurements"),
|
188
199
|
"clientCertificate": obj.get("clientCertificate"),
|
189
200
|
"contentRegex": obj.get("contentRegex"),
|
190
|
-
"headers": obj.get("headers"),
|
191
201
|
"customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
|
192
202
|
"desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
|
193
203
|
"downloadLimit": obj.get("downloadLimit"),
|
@@ -199,9 +209,9 @@ class HttpServerInstantTestRequest(BaseModel):
|
|
199
209
|
"mtuMeasurements": obj.get("mtuMeasurements"),
|
200
210
|
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
201
211
|
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
212
|
+
"oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
|
202
213
|
"password": obj.get("password"),
|
203
214
|
"pathTraceMode": obj.get("pathTraceMode"),
|
204
|
-
"postBody": obj.get("postBody"),
|
205
215
|
"probeMode": obj.get("probeMode"),
|
206
216
|
"protocol": obj.get("protocol"),
|
207
217
|
"sslVersion": obj.get("sslVersion"),
|
@@ -212,11 +222,14 @@ class HttpServerInstantTestRequest(BaseModel):
|
|
212
222
|
"username": obj.get("username"),
|
213
223
|
"verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
|
214
224
|
"allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
|
215
|
-
"ipv6Policy": obj.get("ipv6Policy"),
|
216
225
|
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
217
226
|
"fixedPacketRate": obj.get("fixedPacketRate"),
|
218
227
|
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
219
228
|
"overrideProxyId": obj.get("overrideProxyId"),
|
229
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
|
230
|
+
"headers": obj.get("headers"),
|
231
|
+
"postBody": obj.get("postBody"),
|
232
|
+
"ipv6Policy": obj.get("ipv6Policy"),
|
220
233
|
"agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
221
234
|
})
|
222
235
|
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.
|
@@ -20,6 +19,8 @@ import json
|
|
20
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_ipv6_policy import TestIpv6Policy
|
@@ -35,10 +36,10 @@ class HttpServerProperties(BaseModel):
|
|
35
36
|
HttpServerProperties
|
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
42
|
content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex")
|
41
|
-
headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.")
|
42
43
|
custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
|
43
44
|
desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
|
44
45
|
download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit")
|
@@ -50,9 +51,9 @@ class HttpServerProperties(BaseModel):
|
|
50
51
|
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
51
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")
|
52
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")
|
54
|
+
o_auth: Optional[OAuth] = Field(default=None, alias="oAuth")
|
53
55
|
password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
|
54
56
|
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
55
|
-
post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody")
|
56
57
|
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
57
58
|
protocol: Optional[TestProtocol] = None
|
58
59
|
ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion")
|
@@ -63,13 +64,16 @@ class HttpServerProperties(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")
|
66
|
-
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
67
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
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
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
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
|
+
headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.")
|
73
|
+
post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody")
|
74
|
+
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
71
75
|
type: Optional[StrictStr] = None
|
72
|
-
__properties: ClassVar[List[str]] = ["authType", "
|
76
|
+
__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", "headers", "postBody", "ipv6Policy", "type"]
|
73
77
|
|
74
78
|
model_config = ConfigDict(
|
75
79
|
populate_by_name=True,
|
@@ -115,9 +119,15 @@ class HttpServerProperties(BaseModel):
|
|
115
119
|
exclude=excluded_fields,
|
116
120
|
exclude_none=True,
|
117
121
|
)
|
122
|
+
# override the default output from pydantic by calling `to_dict()` of agent_interfaces
|
123
|
+
if self.agent_interfaces:
|
124
|
+
_dict['agentInterfaces'] = self.agent_interfaces.to_dict()
|
118
125
|
# override the default output from pydantic by calling `to_dict()` of custom_headers
|
119
126
|
if self.custom_headers:
|
120
127
|
_dict['customHeaders'] = self.custom_headers.to_dict()
|
128
|
+
# override the default output from pydantic by calling `to_dict()` of o_auth
|
129
|
+
if self.o_auth:
|
130
|
+
_dict['oAuth'] = self.o_auth.to_dict()
|
121
131
|
return _dict
|
122
132
|
|
123
133
|
@classmethod
|
@@ -131,10 +141,10 @@ class HttpServerProperties(BaseModel):
|
|
131
141
|
|
132
142
|
_obj = cls.model_validate({
|
133
143
|
"authType": obj.get("authType"),
|
144
|
+
"agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None,
|
134
145
|
"bandwidthMeasurements": obj.get("bandwidthMeasurements"),
|
135
146
|
"clientCertificate": obj.get("clientCertificate"),
|
136
147
|
"contentRegex": obj.get("contentRegex"),
|
137
|
-
"headers": obj.get("headers"),
|
138
148
|
"customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
|
139
149
|
"desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
|
140
150
|
"downloadLimit": obj.get("downloadLimit"),
|
@@ -146,9 +156,9 @@ class HttpServerProperties(BaseModel):
|
|
146
156
|
"mtuMeasurements": obj.get("mtuMeasurements"),
|
147
157
|
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
148
158
|
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
159
|
+
"oAuth": OAuth.from_dict(obj["oAuth"]) if obj.get("oAuth") is not None else None,
|
149
160
|
"password": obj.get("password"),
|
150
161
|
"pathTraceMode": obj.get("pathTraceMode"),
|
151
|
-
"postBody": obj.get("postBody"),
|
152
162
|
"probeMode": obj.get("probeMode"),
|
153
163
|
"protocol": obj.get("protocol"),
|
154
164
|
"sslVersion": obj.get("sslVersion"),
|
@@ -159,11 +169,14 @@ class HttpServerProperties(BaseModel):
|
|
159
169
|
"username": obj.get("username"),
|
160
170
|
"verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
|
161
171
|
"allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
|
162
|
-
"ipv6Policy": obj.get("ipv6Policy"),
|
163
172
|
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
164
173
|
"fixedPacketRate": obj.get("fixedPacketRate"),
|
165
174
|
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
166
175
|
"overrideProxyId": obj.get("overrideProxyId"),
|
176
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
|
177
|
+
"headers": obj.get("headers"),
|
178
|
+
"postBody": obj.get("postBody"),
|
179
|
+
"ipv6Policy": obj.get("ipv6Policy"),
|
167
180
|
"type": obj.get("type")
|
168
181
|
})
|
169
182
|
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.
|
@@ -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.
|
@@ -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.
|