thousandeyes-sdk-instant-tests 1.3.0__py3-none-any.whl → 2.0.0rc1__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 +28 -18
- thousandeyes_sdk/instant_tests/api/__init__.py +13 -13
- thousandeyes_sdk/instant_tests/api/{agent_to_agent_api.py → agent_to_agent_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{agent_to_server_api.py → agent_to_server_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{api_api.py → api_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{dns_server_api.py → dns_server_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{dns_trace_api.py → dns_trace_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{dns_security_api.py → dnssec_instant_tests_api.py} +21 -21
- thousandeyes_sdk/instant_tests/api/{ftp_server_api.py → ftp_server_instant_tests_api.py} +31 -31
- thousandeyes_sdk/instant_tests/api/{http_page_load_api.py → http_page_load_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{http_server_api.py → http_server_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{run_api.py → instant_tests_api.py} +2 -2
- thousandeyes_sdk/instant_tests/api/{sip_server_api.py → sip_server_instant_tests_api.py} +9 -9
- thousandeyes_sdk/instant_tests/api/{voice_api.py → voice_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/api/{web_transaction_api.py → web_transaction_instant_tests_api.py} +15 -15
- thousandeyes_sdk/instant_tests/models/__init__.py +15 -5
- thousandeyes_sdk/instant_tests/models/agent_base.py +1 -1
- thousandeyes_sdk/instant_tests/models/agent_interfaces.py +1 -1
- thousandeyes_sdk/instant_tests/models/{agent.py → agent_response.py} +5 -5
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_response.py +195 -0
- thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +6 -1
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_response.py +200 -0
- thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/api_instant_test.py +8 -14
- thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +11 -5
- thousandeyes_sdk/instant_tests/models/api_instant_test_response.py +217 -0
- thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +1 -1
- thousandeyes_sdk/instant_tests/models/api_properties.py +8 -2
- thousandeyes_sdk/instant_tests/models/api_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/api_request_assertion.py +1 -1
- thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +6 -1
- thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +6 -1
- thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +6 -1
- thousandeyes_sdk/instant_tests/models/api_request_header.py +1 -1
- thousandeyes_sdk/instant_tests/models/api_request_method.py +6 -1
- thousandeyes_sdk/instant_tests/models/api_request_variable.py +1 -1
- thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +6 -1
- thousandeyes_sdk/instant_tests/models/dns_query_class.py +6 -1
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_response.py +167 -0
- thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/{sip_server_instant_test_request1.py → dns_server_instant_test_response.py} +36 -27
- thousandeyes_sdk/instant_tests/models/dns_server_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/dns_servers_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_response.py +170 -0
- thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/error.py +1 -1
- thousandeyes_sdk/instant_tests/models/expand_instant_test_options.py +42 -0
- thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/{server_instant_test_request.py → ftp_server_instant_test_request.py} +5 -5
- thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_response.py +204 -0
- thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +6 -1
- thousandeyes_sdk/instant_tests/models/http_server_base_properties.py +3 -3
- thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +5 -17
- thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +3 -3
- thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py +257 -0
- thousandeyes_sdk/instant_tests/models/http_server_properties.py +3 -3
- thousandeyes_sdk/instant_tests/models/instant_test.py +1 -1
- thousandeyes_sdk/instant_tests/models/instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/link.py +1 -1
- thousandeyes_sdk/instant_tests/models/o_auth.py +1 -1
- thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +5 -17
- thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +3 -3
- thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py +269 -0
- thousandeyes_sdk/instant_tests/models/page_load_properties.py +3 -3
- thousandeyes_sdk/instant_tests/models/request_method.py +6 -1
- thousandeyes_sdk/instant_tests/models/shared_with_account.py +1 -1
- thousandeyes_sdk/instant_tests/models/simple_agent.py +1 -1
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +6 -8
- thousandeyes_sdk/instant_tests/models/sip_server_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_agent.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_auth_type.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_custom_headers.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_direction.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_dns_server.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_dscp_id.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_label.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_links.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_probe_mode.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_protocol.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_self_link.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +1 -1
- thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +6 -1
- thousandeyes_sdk/instant_tests/models/test_type.py +6 -1
- thousandeyes_sdk/instant_tests/models/unauthorized_error.py +1 -1
- thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +1 -1
- thousandeyes_sdk/instant_tests/models/validation_error.py +1 -1
- thousandeyes_sdk/instant_tests/models/validation_error_item.py +1 -1
- thousandeyes_sdk/instant_tests/models/voice_instant_test.py +3 -15
- thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +1 -1
- thousandeyes_sdk/instant_tests/models/voice_instant_test_response.py +186 -0
- thousandeyes_sdk/instant_tests/models/voice_properties.py +1 -1
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +4 -16
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +7 -7
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py +273 -0
- thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +3 -3
- {thousandeyes_sdk_instant_tests-1.3.0.dist-info → thousandeyes_sdk_instant_tests-2.0.0rc1.dist-info}/METADATA +36 -26
- thousandeyes_sdk_instant_tests-2.0.0rc1.dist-info/RECORD +121 -0
- {thousandeyes_sdk_instant_tests-1.3.0.dist-info → thousandeyes_sdk_instant_tests-2.0.0rc1.dist-info}/WHEEL +1 -1
- thousandeyes_sdk/instant_tests/models/expand.py +0 -37
- thousandeyes_sdk_instant_tests-1.3.0.dist-info/RECORD +0 -111
- {thousandeyes_sdk_instant_tests-1.3.0.dist-info → thousandeyes_sdk_instant_tests-2.0.0rc1.dist-info}/LICENSE +0 -0
- {thousandeyes_sdk_instant_tests-1.3.0.dist-info → thousandeyes_sdk_instant_tests-2.0.0rc1.dist-info}/NOTICE +0 -0
- {thousandeyes_sdk_instant_tests-1.3.0.dist-info → thousandeyes_sdk_instant_tests-2.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,200 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Instant Tests API
|
5
|
+
|
6
|
+
The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You 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 datetime import datetime
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing_extensions import Annotated
|
23
|
+
from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse
|
24
|
+
from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
|
25
|
+
from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId
|
26
|
+
from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy
|
27
|
+
from thousandeyes_sdk.instant_tests.models.test_label import TestLabel
|
28
|
+
from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
|
29
|
+
from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
|
30
|
+
from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
|
31
|
+
from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
|
32
|
+
from typing import Optional, Set
|
33
|
+
from typing_extensions import Self
|
34
|
+
|
35
|
+
class AgentToServerInstantTestResponse(BaseModel):
|
36
|
+
"""
|
37
|
+
AgentToServerInstantTestResponse
|
38
|
+
""" # noqa: E501
|
39
|
+
created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
|
40
|
+
created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
|
41
|
+
description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
|
42
|
+
live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
|
43
|
+
modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
|
44
|
+
modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
|
45
|
+
saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent")
|
46
|
+
test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId")
|
47
|
+
test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
|
48
|
+
type: Optional[StrictStr] = None
|
49
|
+
links: Optional[TestLinks] = Field(default=None, alias="_links")
|
50
|
+
labels: Optional[List[TestLabel]] = None
|
51
|
+
shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
|
52
|
+
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")
|
53
|
+
continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode")
|
54
|
+
fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate")
|
55
|
+
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
56
|
+
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")
|
57
|
+
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
58
|
+
port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.")
|
59
|
+
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
60
|
+
protocol: Optional[TestProtocol] = None
|
61
|
+
server: StrictStr = Field(description="Target name or IP address.")
|
62
|
+
dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.")
|
63
|
+
dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId")
|
64
|
+
ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
|
65
|
+
ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize")
|
66
|
+
network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements")
|
67
|
+
agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.")
|
68
|
+
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents"]
|
69
|
+
|
70
|
+
model_config = ConfigDict(
|
71
|
+
populate_by_name=True,
|
72
|
+
validate_assignment=True,
|
73
|
+
protected_namespaces=(),
|
74
|
+
extra="allow",
|
75
|
+
)
|
76
|
+
|
77
|
+
|
78
|
+
def to_str(self) -> str:
|
79
|
+
"""Returns the string representation of the model using alias"""
|
80
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
81
|
+
|
82
|
+
def to_json(self) -> str:
|
83
|
+
"""Returns the JSON representation of the model using alias"""
|
84
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
85
|
+
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
89
|
+
"""Create an instance of AgentToServerInstantTestResponse from a JSON string"""
|
90
|
+
return cls.from_dict(json.loads(json_str))
|
91
|
+
|
92
|
+
def to_dict(self) -> Dict[str, Any]:
|
93
|
+
"""Return the dictionary representation of the model using alias.
|
94
|
+
|
95
|
+
This has the following differences from calling pydantic's
|
96
|
+
`self.model_dump(by_alias=True)`:
|
97
|
+
|
98
|
+
* `None` is only added to the output dict for nullable fields that
|
99
|
+
were set at model initialization. Other fields with value `None`
|
100
|
+
are ignored.
|
101
|
+
* OpenAPI `readOnly` fields are excluded.
|
102
|
+
* OpenAPI `readOnly` fields are excluded.
|
103
|
+
* OpenAPI `readOnly` fields are excluded.
|
104
|
+
* OpenAPI `readOnly` fields are excluded.
|
105
|
+
* OpenAPI `readOnly` fields are excluded.
|
106
|
+
* OpenAPI `readOnly` fields are excluded.
|
107
|
+
* OpenAPI `readOnly` fields are excluded.
|
108
|
+
* OpenAPI `readOnly` fields are excluded.
|
109
|
+
* OpenAPI `readOnly` fields are excluded.
|
110
|
+
* OpenAPI `readOnly` fields are excluded.
|
111
|
+
* OpenAPI `readOnly` fields are excluded.
|
112
|
+
"""
|
113
|
+
excluded_fields: Set[str] = set([
|
114
|
+
"created_by",
|
115
|
+
"created_date",
|
116
|
+
"live_share",
|
117
|
+
"modified_by",
|
118
|
+
"modified_date",
|
119
|
+
"saved_event",
|
120
|
+
"test_id",
|
121
|
+
"type",
|
122
|
+
"labels",
|
123
|
+
"shared_with_accounts",
|
124
|
+
"dscp",
|
125
|
+
])
|
126
|
+
|
127
|
+
_dict = self.model_dump(
|
128
|
+
by_alias=True,
|
129
|
+
exclude=excluded_fields,
|
130
|
+
exclude_none=True,
|
131
|
+
)
|
132
|
+
# override the default output from pydantic by calling `to_dict()` of links
|
133
|
+
if self.links:
|
134
|
+
_dict['_links'] = self.links.to_dict()
|
135
|
+
# override the default output from pydantic by calling `to_dict()` of each item in labels (list)
|
136
|
+
_items = []
|
137
|
+
if self.labels:
|
138
|
+
for _item in self.labels:
|
139
|
+
if _item:
|
140
|
+
_items.append(_item.to_dict())
|
141
|
+
_dict['labels'] = _items
|
142
|
+
# override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list)
|
143
|
+
_items = []
|
144
|
+
if self.shared_with_accounts:
|
145
|
+
for _item in self.shared_with_accounts:
|
146
|
+
if _item:
|
147
|
+
_items.append(_item.to_dict())
|
148
|
+
_dict['sharedWithAccounts'] = _items
|
149
|
+
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
150
|
+
_items = []
|
151
|
+
if self.agents:
|
152
|
+
for _item in self.agents:
|
153
|
+
if _item:
|
154
|
+
_items.append(_item.to_dict())
|
155
|
+
_dict['agents'] = _items
|
156
|
+
return _dict
|
157
|
+
|
158
|
+
@classmethod
|
159
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
160
|
+
"""Create an instance of AgentToServerInstantTestResponse from a dict"""
|
161
|
+
if obj is None:
|
162
|
+
return None
|
163
|
+
|
164
|
+
if not isinstance(obj, dict):
|
165
|
+
return cls.model_validate(obj)
|
166
|
+
|
167
|
+
_obj = cls.model_validate({
|
168
|
+
"createdBy": obj.get("createdBy"),
|
169
|
+
"createdDate": obj.get("createdDate"),
|
170
|
+
"description": obj.get("description"),
|
171
|
+
"liveShare": obj.get("liveShare"),
|
172
|
+
"modifiedBy": obj.get("modifiedBy"),
|
173
|
+
"modifiedDate": obj.get("modifiedDate"),
|
174
|
+
"savedEvent": obj.get("savedEvent"),
|
175
|
+
"testId": obj.get("testId"),
|
176
|
+
"testName": obj.get("testName"),
|
177
|
+
"type": obj.get("type"),
|
178
|
+
"_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
179
|
+
"labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
180
|
+
"sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
|
181
|
+
"bandwidthMeasurements": obj.get("bandwidthMeasurements"),
|
182
|
+
"continuousMode": obj.get("continuousMode"),
|
183
|
+
"fixedPacketRate": obj.get("fixedPacketRate"),
|
184
|
+
"mtuMeasurements": obj.get("mtuMeasurements"),
|
185
|
+
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
186
|
+
"pathTraceMode": obj.get("pathTraceMode"),
|
187
|
+
"port": obj.get("port") if obj.get("port") is not None else 49153,
|
188
|
+
"probeMode": obj.get("probeMode"),
|
189
|
+
"protocol": obj.get("protocol"),
|
190
|
+
"server": obj.get("server"),
|
191
|
+
"dscp": obj.get("dscp"),
|
192
|
+
"dscpId": obj.get("dscpId"),
|
193
|
+
"ipv6Policy": obj.get("ipv6Policy"),
|
194
|
+
"pingPayloadSize": obj.get("pingPayloadSize"),
|
195
|
+
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False,
|
196
|
+
"agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
197
|
+
})
|
198
|
+
return _obj
|
199
|
+
|
200
|
+
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Instant Tests API
|
5
5
|
|
6
|
-
The Instant Tests API
|
6
|
+
The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You 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
8
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Instant Tests API
|
5
5
|
|
6
|
-
The Instant Tests API
|
6
|
+
The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You 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
8
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
9
9
|
|
@@ -20,7 +20,6 @@ from datetime import datetime
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
22
|
from typing_extensions import Annotated
|
23
|
-
from thousandeyes_sdk.instant_tests.models.agent import Agent
|
24
23
|
from thousandeyes_sdk.instant_tests.models.api_predefined_variable import ApiPredefinedVariable
|
25
24
|
from thousandeyes_sdk.instant_tests.models.api_request import ApiRequest
|
26
25
|
from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
|
@@ -50,10 +49,13 @@ class ApiInstantTest(BaseModel):
|
|
50
49
|
links: Optional[TestLinks] = Field(default=None, alias="_links")
|
51
50
|
labels: Optional[List[TestLabel]] = None
|
52
51
|
shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
|
52
|
+
collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
|
53
53
|
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")
|
54
54
|
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
55
55
|
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")
|
56
56
|
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")
|
57
|
+
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")
|
58
|
+
override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
|
57
59
|
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
58
60
|
predefined_variables: Optional[List[ApiPredefinedVariable]] = Field(default=None, alias="predefinedVariables")
|
59
61
|
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
@@ -63,9 +65,8 @@ class ApiInstantTest(BaseModel):
|
|
63
65
|
target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion metric, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime")
|
64
66
|
time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds. Exceeding this limit will result in a Timeout error.", alias="timeLimit")
|
65
67
|
url: StrictStr = Field(description="Target for the test.")
|
66
|
-
agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
|
67
68
|
credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).")
|
68
|
-
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "
|
69
|
+
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "collectProxyNetworkData", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "overrideAgentProxy", "overrideProxyId", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "credentials"]
|
69
70
|
|
70
71
|
model_config = ConfigDict(
|
71
72
|
populate_by_name=True,
|
@@ -108,7 +109,6 @@ class ApiInstantTest(BaseModel):
|
|
108
109
|
* OpenAPI `readOnly` fields are excluded.
|
109
110
|
* OpenAPI `readOnly` fields are excluded.
|
110
111
|
* OpenAPI `readOnly` fields are excluded.
|
111
|
-
* OpenAPI `readOnly` fields are excluded.
|
112
112
|
"""
|
113
113
|
excluded_fields: Set[str] = set([
|
114
114
|
"created_by",
|
@@ -121,7 +121,6 @@ class ApiInstantTest(BaseModel):
|
|
121
121
|
"type",
|
122
122
|
"labels",
|
123
123
|
"shared_with_accounts",
|
124
|
-
"agents",
|
125
124
|
])
|
126
125
|
|
127
126
|
_dict = self.model_dump(
|
@@ -160,13 +159,6 @@ class ApiInstantTest(BaseModel):
|
|
160
159
|
if _item:
|
161
160
|
_items.append(_item.to_dict())
|
162
161
|
_dict['requests'] = _items
|
163
|
-
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
164
|
-
_items = []
|
165
|
-
if self.agents:
|
166
|
-
for _item in self.agents:
|
167
|
-
if _item:
|
168
|
-
_items.append(_item.to_dict())
|
169
|
-
_dict['agents'] = _items
|
170
162
|
return _dict
|
171
163
|
|
172
164
|
@classmethod
|
@@ -192,10 +184,13 @@ class ApiInstantTest(BaseModel):
|
|
192
184
|
"_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
193
185
|
"labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
194
186
|
"sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
|
187
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
|
195
188
|
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
196
189
|
"mtuMeasurements": obj.get("mtuMeasurements"),
|
197
190
|
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
198
191
|
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
192
|
+
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
193
|
+
"overrideProxyId": obj.get("overrideProxyId"),
|
199
194
|
"pathTraceMode": obj.get("pathTraceMode"),
|
200
195
|
"predefinedVariables": [ApiPredefinedVariable.from_dict(_item) for _item in obj["predefinedVariables"]] if obj.get("predefinedVariables") is not None else None,
|
201
196
|
"probeMode": obj.get("probeMode"),
|
@@ -205,7 +200,6 @@ class ApiInstantTest(BaseModel):
|
|
205
200
|
"targetTime": obj.get("targetTime"),
|
206
201
|
"timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30,
|
207
202
|
"url": obj.get("url"),
|
208
|
-
"agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None,
|
209
203
|
"credentials": obj.get("credentials")
|
210
204
|
})
|
211
205
|
return _obj
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Instant Tests API
|
5
5
|
|
6
|
-
The Instant Tests API
|
6
|
+
The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You 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
8
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
9
9
|
|
@@ -48,10 +48,13 @@ class ApiInstantTestRequest(BaseModel):
|
|
48
48
|
links: Optional[TestLinks] = Field(default=None, alias="_links")
|
49
49
|
labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).")
|
50
50
|
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")
|
51
|
+
collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
|
51
52
|
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")
|
52
53
|
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
53
54
|
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")
|
54
55
|
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")
|
56
|
+
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")
|
57
|
+
override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
|
55
58
|
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
56
59
|
predefined_variables: Optional[List[ApiPredefinedVariable]] = Field(default=None, alias="predefinedVariables")
|
57
60
|
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
@@ -61,9 +64,9 @@ class ApiInstantTestRequest(BaseModel):
|
|
61
64
|
target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion metric, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime")
|
62
65
|
time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds. Exceeding this limit will result in a Timeout error.", alias="timeLimit")
|
63
66
|
url: StrictStr = Field(description="Target for the test.")
|
64
|
-
agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
|
65
67
|
credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).")
|
66
|
-
|
68
|
+
agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
|
69
|
+
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "collectProxyNetworkData", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "overrideAgentProxy", "overrideProxyId", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "credentials", "agents"]
|
67
70
|
|
68
71
|
model_config = ConfigDict(
|
69
72
|
populate_by_name=True,
|
@@ -170,10 +173,13 @@ class ApiInstantTestRequest(BaseModel):
|
|
170
173
|
"_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
171
174
|
"labels": obj.get("labels"),
|
172
175
|
"sharedWithAccounts": obj.get("sharedWithAccounts"),
|
176
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
|
173
177
|
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
174
178
|
"mtuMeasurements": obj.get("mtuMeasurements"),
|
175
179
|
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
176
180
|
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
181
|
+
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
182
|
+
"overrideProxyId": obj.get("overrideProxyId"),
|
177
183
|
"pathTraceMode": obj.get("pathTraceMode"),
|
178
184
|
"predefinedVariables": [ApiPredefinedVariable.from_dict(_item) for _item in obj["predefinedVariables"]] if obj.get("predefinedVariables") is not None else None,
|
179
185
|
"probeMode": obj.get("probeMode"),
|
@@ -183,8 +189,8 @@ class ApiInstantTestRequest(BaseModel):
|
|
183
189
|
"targetTime": obj.get("targetTime"),
|
184
190
|
"timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30,
|
185
191
|
"url": obj.get("url"),
|
186
|
-
"
|
187
|
-
"
|
192
|
+
"credentials": obj.get("credentials"),
|
193
|
+
"agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
188
194
|
})
|
189
195
|
return _obj
|
190
196
|
|
@@ -0,0 +1,217 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Instant Tests API
|
5
|
+
|
6
|
+
The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You 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 datetime import datetime
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing_extensions import Annotated
|
23
|
+
from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse
|
24
|
+
from thousandeyes_sdk.instant_tests.models.api_predefined_variable import ApiPredefinedVariable
|
25
|
+
from thousandeyes_sdk.instant_tests.models.api_request import ApiRequest
|
26
|
+
from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
|
27
|
+
from thousandeyes_sdk.instant_tests.models.test_label import TestLabel
|
28
|
+
from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
|
29
|
+
from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
|
30
|
+
from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
|
31
|
+
from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
|
32
|
+
from thousandeyes_sdk.instant_tests.models.test_ssl_version_id import TestSslVersionId
|
33
|
+
from typing import Optional, Set
|
34
|
+
from typing_extensions import Self
|
35
|
+
|
36
|
+
class ApiInstantTestResponse(BaseModel):
|
37
|
+
"""
|
38
|
+
ApiInstantTestResponse
|
39
|
+
""" # noqa: E501
|
40
|
+
created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
|
41
|
+
created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
|
42
|
+
description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
|
43
|
+
live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
|
44
|
+
modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
|
45
|
+
modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
|
46
|
+
saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent")
|
47
|
+
test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId")
|
48
|
+
test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
|
49
|
+
type: Optional[StrictStr] = None
|
50
|
+
links: Optional[TestLinks] = Field(default=None, alias="_links")
|
51
|
+
labels: Optional[List[TestLabel]] = None
|
52
|
+
shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
|
53
|
+
collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData")
|
54
|
+
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")
|
55
|
+
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
56
|
+
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")
|
57
|
+
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")
|
58
|
+
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")
|
59
|
+
override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
|
60
|
+
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
61
|
+
predefined_variables: Optional[List[ApiPredefinedVariable]] = Field(default=None, alias="predefinedVariables")
|
62
|
+
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
63
|
+
protocol: Optional[TestProtocol] = None
|
64
|
+
requests: List[ApiRequest]
|
65
|
+
ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId")
|
66
|
+
target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion metric, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime")
|
67
|
+
time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds. Exceeding this limit will result in a Timeout error.", alias="timeLimit")
|
68
|
+
url: StrictStr = Field(description="Target for the test.")
|
69
|
+
credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).")
|
70
|
+
agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.")
|
71
|
+
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "collectProxyNetworkData", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "overrideAgentProxy", "overrideProxyId", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "credentials", "agents"]
|
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 ApiInstantTestResponse 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
|
+
* OpenAPI `readOnly` fields are excluded.
|
106
|
+
* OpenAPI `readOnly` fields are excluded.
|
107
|
+
* OpenAPI `readOnly` fields are excluded.
|
108
|
+
* OpenAPI `readOnly` fields are excluded.
|
109
|
+
* OpenAPI `readOnly` fields are excluded.
|
110
|
+
* OpenAPI `readOnly` fields are excluded.
|
111
|
+
* OpenAPI `readOnly` fields are excluded.
|
112
|
+
* OpenAPI `readOnly` fields are excluded.
|
113
|
+
* OpenAPI `readOnly` fields are excluded.
|
114
|
+
"""
|
115
|
+
excluded_fields: Set[str] = set([
|
116
|
+
"created_by",
|
117
|
+
"created_date",
|
118
|
+
"live_share",
|
119
|
+
"modified_by",
|
120
|
+
"modified_date",
|
121
|
+
"saved_event",
|
122
|
+
"test_id",
|
123
|
+
"type",
|
124
|
+
"labels",
|
125
|
+
"shared_with_accounts",
|
126
|
+
])
|
127
|
+
|
128
|
+
_dict = self.model_dump(
|
129
|
+
by_alias=True,
|
130
|
+
exclude=excluded_fields,
|
131
|
+
exclude_none=True,
|
132
|
+
)
|
133
|
+
# override the default output from pydantic by calling `to_dict()` of links
|
134
|
+
if self.links:
|
135
|
+
_dict['_links'] = self.links.to_dict()
|
136
|
+
# override the default output from pydantic by calling `to_dict()` of each item in labels (list)
|
137
|
+
_items = []
|
138
|
+
if self.labels:
|
139
|
+
for _item in self.labels:
|
140
|
+
if _item:
|
141
|
+
_items.append(_item.to_dict())
|
142
|
+
_dict['labels'] = _items
|
143
|
+
# override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list)
|
144
|
+
_items = []
|
145
|
+
if self.shared_with_accounts:
|
146
|
+
for _item in self.shared_with_accounts:
|
147
|
+
if _item:
|
148
|
+
_items.append(_item.to_dict())
|
149
|
+
_dict['sharedWithAccounts'] = _items
|
150
|
+
# override the default output from pydantic by calling `to_dict()` of each item in predefined_variables (list)
|
151
|
+
_items = []
|
152
|
+
if self.predefined_variables:
|
153
|
+
for _item in self.predefined_variables:
|
154
|
+
if _item:
|
155
|
+
_items.append(_item.to_dict())
|
156
|
+
_dict['predefinedVariables'] = _items
|
157
|
+
# override the default output from pydantic by calling `to_dict()` of each item in requests (list)
|
158
|
+
_items = []
|
159
|
+
if self.requests:
|
160
|
+
for _item in self.requests:
|
161
|
+
if _item:
|
162
|
+
_items.append(_item.to_dict())
|
163
|
+
_dict['requests'] = _items
|
164
|
+
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
165
|
+
_items = []
|
166
|
+
if self.agents:
|
167
|
+
for _item in self.agents:
|
168
|
+
if _item:
|
169
|
+
_items.append(_item.to_dict())
|
170
|
+
_dict['agents'] = _items
|
171
|
+
return _dict
|
172
|
+
|
173
|
+
@classmethod
|
174
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
175
|
+
"""Create an instance of ApiInstantTestResponse from a dict"""
|
176
|
+
if obj is None:
|
177
|
+
return None
|
178
|
+
|
179
|
+
if not isinstance(obj, dict):
|
180
|
+
return cls.model_validate(obj)
|
181
|
+
|
182
|
+
_obj = cls.model_validate({
|
183
|
+
"createdBy": obj.get("createdBy"),
|
184
|
+
"createdDate": obj.get("createdDate"),
|
185
|
+
"description": obj.get("description"),
|
186
|
+
"liveShare": obj.get("liveShare"),
|
187
|
+
"modifiedBy": obj.get("modifiedBy"),
|
188
|
+
"modifiedDate": obj.get("modifiedDate"),
|
189
|
+
"savedEvent": obj.get("savedEvent"),
|
190
|
+
"testId": obj.get("testId"),
|
191
|
+
"testName": obj.get("testName"),
|
192
|
+
"type": obj.get("type"),
|
193
|
+
"_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
194
|
+
"labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
195
|
+
"sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
|
196
|
+
"collectProxyNetworkData": obj.get("collectProxyNetworkData") if obj.get("collectProxyNetworkData") is not None else False,
|
197
|
+
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
198
|
+
"mtuMeasurements": obj.get("mtuMeasurements"),
|
199
|
+
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
200
|
+
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
201
|
+
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
202
|
+
"overrideProxyId": obj.get("overrideProxyId"),
|
203
|
+
"pathTraceMode": obj.get("pathTraceMode"),
|
204
|
+
"predefinedVariables": [ApiPredefinedVariable.from_dict(_item) for _item in obj["predefinedVariables"]] if obj.get("predefinedVariables") is not None else None,
|
205
|
+
"probeMode": obj.get("probeMode"),
|
206
|
+
"protocol": obj.get("protocol"),
|
207
|
+
"requests": [ApiRequest.from_dict(_item) for _item in obj["requests"]] if obj.get("requests") is not None else None,
|
208
|
+
"sslVersionId": obj.get("sslVersionId"),
|
209
|
+
"targetTime": obj.get("targetTime"),
|
210
|
+
"timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30,
|
211
|
+
"url": obj.get("url"),
|
212
|
+
"credentials": obj.get("credentials"),
|
213
|
+
"agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
214
|
+
})
|
215
|
+
return _obj
|
216
|
+
|
217
|
+
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Instant Tests API
|
5
5
|
|
6
|
-
The Instant Tests API
|
6
|
+
The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You 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
8
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
9
9
|
|