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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. thousandeyes_sdk/instant_tests/__init__.py +117 -0
  2. thousandeyes_sdk/instant_tests/api/__init__.py +17 -0
  3. thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py +376 -0
  4. thousandeyes_sdk/instant_tests/api/agent_to_server_api.py +376 -0
  5. thousandeyes_sdk/instant_tests/api/api_api.py +376 -0
  6. thousandeyes_sdk/instant_tests/api/dns_security_api.py +376 -0
  7. thousandeyes_sdk/instant_tests/api/dns_server_api.py +376 -0
  8. thousandeyes_sdk/instant_tests/api/dns_trace_api.py +376 -0
  9. thousandeyes_sdk/instant_tests/api/ftp_server_api.py +376 -0
  10. thousandeyes_sdk/instant_tests/api/http_page_load_api.py +376 -0
  11. thousandeyes_sdk/instant_tests/api/http_server_api.py +376 -0
  12. thousandeyes_sdk/instant_tests/api/run_api.py +338 -0
  13. thousandeyes_sdk/instant_tests/api/sip_server_api.py +376 -0
  14. thousandeyes_sdk/instant_tests/api/voice_api.py +376 -0
  15. thousandeyes_sdk/instant_tests/api/web_transaction_api.py +376 -0
  16. thousandeyes_sdk/instant_tests/models/__init__.py +100 -0
  17. thousandeyes_sdk/instant_tests/models/agent.py +125 -0
  18. thousandeyes_sdk/instant_tests/models/agent_base.py +98 -0
  19. thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +198 -0
  20. thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +176 -0
  21. thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +123 -0
  22. thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +37 -0
  23. thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +203 -0
  24. thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +181 -0
  25. thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +128 -0
  26. thousandeyes_sdk/instant_tests/models/api_instant_test.py +214 -0
  27. thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +192 -0
  28. thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +90 -0
  29. thousandeyes_sdk/instant_tests/models/api_properties.py +137 -0
  30. thousandeyes_sdk/instant_tests/models/api_request.py +138 -0
  31. thousandeyes_sdk/instant_tests/models/api_request_assertion.py +94 -0
  32. thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +37 -0
  33. thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +39 -0
  34. thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +38 -0
  35. thousandeyes_sdk/instant_tests/models/api_request_header.py +90 -0
  36. thousandeyes_sdk/instant_tests/models/api_request_method.py +40 -0
  37. thousandeyes_sdk/instant_tests/models/api_request_variable.py +90 -0
  38. thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +38 -0
  39. thousandeyes_sdk/instant_tests/models/dns_query_class.py +37 -0
  40. thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +170 -0
  41. thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +148 -0
  42. thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +95 -0
  43. thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +208 -0
  44. thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +178 -0
  45. thousandeyes_sdk/instant_tests/models/dns_server_properties.py +133 -0
  46. thousandeyes_sdk/instant_tests/models/dns_servers_request.py +88 -0
  47. thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +173 -0
  48. thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +151 -0
  49. thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +98 -0
  50. thousandeyes_sdk/instant_tests/models/error.py +96 -0
  51. thousandeyes_sdk/instant_tests/models/expand.py +38 -0
  52. thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +207 -0
  53. thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +132 -0
  54. thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +38 -0
  55. thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +246 -0
  56. thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +224 -0
  57. thousandeyes_sdk/instant_tests/models/http_server_properties.py +171 -0
  58. thousandeyes_sdk/instant_tests/models/instant_test.py +152 -0
  59. thousandeyes_sdk/instant_tests/models/instant_test_request.py +100 -0
  60. thousandeyes_sdk/instant_tests/models/link.py +102 -0
  61. thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +254 -0
  62. thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +232 -0
  63. thousandeyes_sdk/instant_tests/models/page_load_properties.py +179 -0
  64. thousandeyes_sdk/instant_tests/models/server_instant_test_request.py +185 -0
  65. thousandeyes_sdk/instant_tests/models/shared_with_account.py +90 -0
  66. thousandeyes_sdk/instant_tests/models/simple_agent.py +122 -0
  67. thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +191 -0
  68. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +175 -0
  69. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py +197 -0
  70. thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +204 -0
  71. thousandeyes_sdk/instant_tests/models/sip_server_properties.py +116 -0
  72. thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +38 -0
  73. thousandeyes_sdk/instant_tests/models/test_agent.py +90 -0
  74. thousandeyes_sdk/instant_tests/models/test_auth_type.py +40 -0
  75. thousandeyes_sdk/instant_tests/models/test_custom_headers.py +92 -0
  76. thousandeyes_sdk/instant_tests/models/test_direction.py +38 -0
  77. thousandeyes_sdk/instant_tests/models/test_dns_server.py +90 -0
  78. thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +37 -0
  79. thousandeyes_sdk/instant_tests/models/test_dscp_id.py +57 -0
  80. thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +39 -0
  81. thousandeyes_sdk/instant_tests/models/test_label.py +92 -0
  82. thousandeyes_sdk/instant_tests/models/test_links.py +102 -0
  83. thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +38 -0
  84. thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +37 -0
  85. thousandeyes_sdk/instant_tests/models/test_probe_mode.py +38 -0
  86. thousandeyes_sdk/instant_tests/models/test_protocol.py +38 -0
  87. thousandeyes_sdk/instant_tests/models/test_self_link.py +102 -0
  88. thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +100 -0
  89. thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +40 -0
  90. thousandeyes_sdk/instant_tests/models/test_type.py +48 -0
  91. thousandeyes_sdk/instant_tests/models/unauthorized_error.py +90 -0
  92. thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +128 -0
  93. thousandeyes_sdk/instant_tests/models/validation_error.py +111 -0
  94. thousandeyes_sdk/instant_tests/models/validation_error_item.py +92 -0
  95. thousandeyes_sdk/instant_tests/models/voice_instant_test.py +189 -0
  96. thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +167 -0
  97. thousandeyes_sdk/instant_tests/models/voice_properties.py +114 -0
  98. thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +258 -0
  99. thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +236 -0
  100. thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +181 -0
  101. thousandeyes_sdk/instant_tests/py.typed +0 -0
  102. thousandeyes_sdk_instant_tests-1.0.0.dist-info/LICENSE +176 -0
  103. thousandeyes_sdk_instant_tests-1.0.0.dist-info/METADATA +423 -0
  104. thousandeyes_sdk_instant_tests-1.0.0.dist-info/NOTICE +7 -0
  105. thousandeyes_sdk_instant_tests-1.0.0.dist-info/RECORD +107 -0
  106. thousandeyes_sdk_instant_tests-1.0.0.dist-info/WHEEL +5 -0
  107. thousandeyes_sdk_instant_tests-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,178 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Instant Tests API
5
+
6
+ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test.
7
+
8
+ The version of the OpenAPI document: 7.0.8
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass
25
+ from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent
26
+ from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol
27
+ from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy
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 DnsServerInstantTestRequest(BaseModel):
36
+ """
37
+ DnsServerInstantTestRequest
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[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).")
51
+ 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")
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
+ dns_servers: List[StrictStr] = Field(description="A list of DNS server FQDN.", alias="dnsServers")
54
+ dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol")
55
+ domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.")
56
+ mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
57
+ 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")
58
+ 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")
59
+ path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
60
+ probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
61
+ protocol: Optional[TestProtocol] = None
62
+ recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries")
63
+ ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
64
+ 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")
65
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
66
+ agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
67
+ __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents"]
68
+
69
+ model_config = ConfigDict(
70
+ populate_by_name=True,
71
+ validate_assignment=True,
72
+ protected_namespaces=(),
73
+ extra="allow",
74
+ )
75
+
76
+
77
+ def to_str(self) -> str:
78
+ """Returns the string representation of the model using alias"""
79
+ return pprint.pformat(self.model_dump(by_alias=True))
80
+
81
+ def to_json(self) -> str:
82
+ """Returns the JSON representation of the model using alias"""
83
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
84
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
85
+
86
+ @classmethod
87
+ def from_json(cls, json_str: str) -> Optional[Self]:
88
+ """Create an instance of DnsServerInstantTestRequest from a JSON string"""
89
+ return cls.from_dict(json.loads(json_str))
90
+
91
+ def to_dict(self) -> Dict[str, Any]:
92
+ """Return the dictionary representation of the model using alias.
93
+
94
+ This has the following differences from calling pydantic's
95
+ `self.model_dump(by_alias=True)`:
96
+
97
+ * `None` is only added to the output dict for nullable fields that
98
+ were set at model initialization. Other fields with value `None`
99
+ are ignored.
100
+ * OpenAPI `readOnly` fields are excluded.
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
+ """
109
+ excluded_fields: Set[str] = set([
110
+ "created_by",
111
+ "created_date",
112
+ "live_share",
113
+ "modified_by",
114
+ "modified_date",
115
+ "saved_event",
116
+ "test_id",
117
+ "type",
118
+ ])
119
+
120
+ _dict = self.model_dump(
121
+ by_alias=True,
122
+ exclude=excluded_fields,
123
+ exclude_none=True,
124
+ )
125
+ # override the default output from pydantic by calling `to_dict()` of links
126
+ if self.links:
127
+ _dict['_links'] = self.links.to_dict()
128
+ # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
129
+ _items = []
130
+ if self.agents:
131
+ for _item in self.agents:
132
+ if _item:
133
+ _items.append(_item.to_dict())
134
+ _dict['agents'] = _items
135
+ return _dict
136
+
137
+ @classmethod
138
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139
+ """Create an instance of DnsServerInstantTestRequest from a dict"""
140
+ if obj is None:
141
+ return None
142
+
143
+ if not isinstance(obj, dict):
144
+ return cls.model_validate(obj)
145
+
146
+ _obj = cls.model_validate({
147
+ "createdBy": obj.get("createdBy"),
148
+ "createdDate": obj.get("createdDate"),
149
+ "description": obj.get("description"),
150
+ "liveShare": obj.get("liveShare"),
151
+ "modifiedBy": obj.get("modifiedBy"),
152
+ "modifiedDate": obj.get("modifiedDate"),
153
+ "savedEvent": obj.get("savedEvent"),
154
+ "testId": obj.get("testId"),
155
+ "testName": obj.get("testName"),
156
+ "type": obj.get("type"),
157
+ "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
158
+ "labels": obj.get("labels"),
159
+ "sharedWithAccounts": obj.get("sharedWithAccounts"),
160
+ "bandwidthMeasurements": obj.get("bandwidthMeasurements"),
161
+ "dnsServers": obj.get("dnsServers"),
162
+ "dnsTransportProtocol": obj.get("dnsTransportProtocol"),
163
+ "domain": obj.get("domain"),
164
+ "mtuMeasurements": obj.get("mtuMeasurements"),
165
+ "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
166
+ "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
167
+ "pathTraceMode": obj.get("pathTraceMode"),
168
+ "probeMode": obj.get("probeMode"),
169
+ "protocol": obj.get("protocol"),
170
+ "recursiveQueries": obj.get("recursiveQueries"),
171
+ "ipv6Policy": obj.get("ipv6Policy"),
172
+ "fixedPacketRate": obj.get("fixedPacketRate"),
173
+ "dnsQueryClass": obj.get("dnsQueryClass"),
174
+ "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
175
+ })
176
+ return _obj
177
+
178
+
@@ -0,0 +1,133 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Instant Tests API
5
+
6
+ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test.
7
+
8
+ The version of the OpenAPI document: 7.0.8
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass
24
+ from thousandeyes_sdk.instant_tests.models.test_dns_server import TestDnsServer
25
+ from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol
26
+ from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy
27
+ from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
28
+ from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
29
+ from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
30
+ from typing import Optional, Set
31
+ from typing_extensions import Self
32
+
33
+ class DnsServerProperties(BaseModel):
34
+ """
35
+ DnsServerProperties
36
+ """ # noqa: E501
37
+ 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")
38
+ dns_servers: List[TestDnsServer] = Field(alias="dnsServers")
39
+ dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol")
40
+ domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.")
41
+ mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
42
+ 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")
43
+ 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")
44
+ path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
45
+ probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
46
+ protocol: Optional[TestProtocol] = None
47
+ recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries")
48
+ ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
49
+ 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")
50
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
51
+ type: Optional[StrictStr] = None
52
+ __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "type"]
53
+
54
+ model_config = ConfigDict(
55
+ populate_by_name=True,
56
+ validate_assignment=True,
57
+ protected_namespaces=(),
58
+ extra="allow",
59
+ )
60
+
61
+
62
+ def to_str(self) -> str:
63
+ """Returns the string representation of the model using alias"""
64
+ return pprint.pformat(self.model_dump(by_alias=True))
65
+
66
+ def to_json(self) -> str:
67
+ """Returns the JSON representation of the model using alias"""
68
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
69
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
70
+
71
+ @classmethod
72
+ def from_json(cls, json_str: str) -> Optional[Self]:
73
+ """Create an instance of DnsServerProperties from a JSON string"""
74
+ return cls.from_dict(json.loads(json_str))
75
+
76
+ def to_dict(self) -> Dict[str, Any]:
77
+ """Return the dictionary representation of the model using alias.
78
+
79
+ This has the following differences from calling pydantic's
80
+ `self.model_dump(by_alias=True)`:
81
+
82
+ * `None` is only added to the output dict for nullable fields that
83
+ were set at model initialization. Other fields with value `None`
84
+ are ignored.
85
+ * OpenAPI `readOnly` fields are excluded.
86
+ """
87
+ excluded_fields: Set[str] = set([
88
+ "type",
89
+ ])
90
+
91
+ _dict = self.model_dump(
92
+ by_alias=True,
93
+ exclude=excluded_fields,
94
+ exclude_none=True,
95
+ )
96
+ # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list)
97
+ _items = []
98
+ if self.dns_servers:
99
+ for _item in self.dns_servers:
100
+ if _item:
101
+ _items.append(_item.to_dict())
102
+ _dict['dnsServers'] = _items
103
+ return _dict
104
+
105
+ @classmethod
106
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
107
+ """Create an instance of DnsServerProperties from a dict"""
108
+ if obj is None:
109
+ return None
110
+
111
+ if not isinstance(obj, dict):
112
+ return cls.model_validate(obj)
113
+
114
+ _obj = cls.model_validate({
115
+ "bandwidthMeasurements": obj.get("bandwidthMeasurements"),
116
+ "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None,
117
+ "dnsTransportProtocol": obj.get("dnsTransportProtocol"),
118
+ "domain": obj.get("domain"),
119
+ "mtuMeasurements": obj.get("mtuMeasurements"),
120
+ "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
121
+ "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
122
+ "pathTraceMode": obj.get("pathTraceMode"),
123
+ "probeMode": obj.get("probeMode"),
124
+ "protocol": obj.get("protocol"),
125
+ "recursiveQueries": obj.get("recursiveQueries"),
126
+ "ipv6Policy": obj.get("ipv6Policy"),
127
+ "fixedPacketRate": obj.get("fixedPacketRate"),
128
+ "dnsQueryClass": obj.get("dnsQueryClass"),
129
+ "type": obj.get("type")
130
+ })
131
+ return _obj
132
+
133
+
@@ -0,0 +1,88 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Instant Tests API
5
+
6
+ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test.
7
+
8
+ The version of the OpenAPI document: 7.0.8
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class DnsServersRequest(BaseModel):
26
+ """
27
+ DnsServersRequest
28
+ """ # noqa: E501
29
+ dns_servers: Optional[List[StrictStr]] = Field(default=None, description="A list of DNS server FQDN.", alias="dnsServers")
30
+ __properties: ClassVar[List[str]] = ["dnsServers"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ extra="allow",
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of DnsServersRequest from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of DnsServersRequest from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "dnsServers": obj.get("dnsServers")
85
+ })
86
+ return _obj
87
+
88
+
@@ -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
+ The version of the OpenAPI document: 7.0.8
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from thousandeyes_sdk.instant_tests.models.agent import Agent
24
+ from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass
25
+ from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
26
+ from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol
27
+ from thousandeyes_sdk.instant_tests.models.test_label import TestLabel
28
+ from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
29
+ from typing import Optional, Set
30
+ from typing_extensions import Self
31
+
32
+ class DnsTraceInstantTest(BaseModel):
33
+ """
34
+ DnsTraceInstantTest
35
+ """ # noqa: E501
36
+ created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
37
+ created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
38
+ description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
39
+ live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
40
+ modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
41
+ modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
42
+ saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent")
43
+ 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")
44
+ test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
45
+ type: Optional[StrictStr] = None
46
+ links: Optional[TestLinks] = Field(default=None, alias="_links")
47
+ labels: Optional[List[TestLabel]] = None
48
+ shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
49
+ dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol")
50
+ domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.")
51
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
52
+ agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
53
+ __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "agents"]
54
+
55
+ model_config = ConfigDict(
56
+ populate_by_name=True,
57
+ validate_assignment=True,
58
+ protected_namespaces=(),
59
+ extra="allow",
60
+ )
61
+
62
+
63
+ def to_str(self) -> str:
64
+ """Returns the string representation of the model using alias"""
65
+ return pprint.pformat(self.model_dump(by_alias=True))
66
+
67
+ def to_json(self) -> str:
68
+ """Returns the JSON representation of the model using alias"""
69
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
70
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
71
+
72
+ @classmethod
73
+ def from_json(cls, json_str: str) -> Optional[Self]:
74
+ """Create an instance of DnsTraceInstantTest from a JSON string"""
75
+ return cls.from_dict(json.loads(json_str))
76
+
77
+ def to_dict(self) -> Dict[str, Any]:
78
+ """Return the dictionary representation of the model using alias.
79
+
80
+ This has the following differences from calling pydantic's
81
+ `self.model_dump(by_alias=True)`:
82
+
83
+ * `None` is only added to the output dict for nullable fields that
84
+ were set at model initialization. Other fields with value `None`
85
+ are ignored.
86
+ * OpenAPI `readOnly` fields are excluded.
87
+ * OpenAPI `readOnly` fields are excluded.
88
+ * OpenAPI `readOnly` fields are excluded.
89
+ * OpenAPI `readOnly` fields are excluded.
90
+ * OpenAPI `readOnly` fields are excluded.
91
+ * OpenAPI `readOnly` fields are excluded.
92
+ * OpenAPI `readOnly` fields are excluded.
93
+ * OpenAPI `readOnly` fields are excluded.
94
+ * OpenAPI `readOnly` fields are excluded.
95
+ * OpenAPI `readOnly` fields are excluded.
96
+ * OpenAPI `readOnly` fields are excluded.
97
+ """
98
+ excluded_fields: Set[str] = set([
99
+ "created_by",
100
+ "created_date",
101
+ "live_share",
102
+ "modified_by",
103
+ "modified_date",
104
+ "saved_event",
105
+ "test_id",
106
+ "type",
107
+ "labels",
108
+ "shared_with_accounts",
109
+ "agents",
110
+ ])
111
+
112
+ _dict = self.model_dump(
113
+ by_alias=True,
114
+ exclude=excluded_fields,
115
+ exclude_none=True,
116
+ )
117
+ # override the default output from pydantic by calling `to_dict()` of links
118
+ if self.links:
119
+ _dict['_links'] = self.links.to_dict()
120
+ # override the default output from pydantic by calling `to_dict()` of each item in labels (list)
121
+ _items = []
122
+ if self.labels:
123
+ for _item in self.labels:
124
+ if _item:
125
+ _items.append(_item.to_dict())
126
+ _dict['labels'] = _items
127
+ # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list)
128
+ _items = []
129
+ if self.shared_with_accounts:
130
+ for _item in self.shared_with_accounts:
131
+ if _item:
132
+ _items.append(_item.to_dict())
133
+ _dict['sharedWithAccounts'] = _items
134
+ # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
135
+ _items = []
136
+ if self.agents:
137
+ for _item in self.agents:
138
+ if _item:
139
+ _items.append(_item.to_dict())
140
+ _dict['agents'] = _items
141
+ return _dict
142
+
143
+ @classmethod
144
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
145
+ """Create an instance of DnsTraceInstantTest from a dict"""
146
+ if obj is None:
147
+ return None
148
+
149
+ if not isinstance(obj, dict):
150
+ return cls.model_validate(obj)
151
+
152
+ _obj = cls.model_validate({
153
+ "createdBy": obj.get("createdBy"),
154
+ "createdDate": obj.get("createdDate"),
155
+ "description": obj.get("description"),
156
+ "liveShare": obj.get("liveShare"),
157
+ "modifiedBy": obj.get("modifiedBy"),
158
+ "modifiedDate": obj.get("modifiedDate"),
159
+ "savedEvent": obj.get("savedEvent"),
160
+ "testId": obj.get("testId"),
161
+ "testName": obj.get("testName"),
162
+ "type": obj.get("type"),
163
+ "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
164
+ "labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
165
+ "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
166
+ "dnsTransportProtocol": obj.get("dnsTransportProtocol"),
167
+ "domain": obj.get("domain"),
168
+ "dnsQueryClass": obj.get("dnsQueryClass"),
169
+ "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
170
+ })
171
+ return _obj
172
+
173
+