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,170 @@
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_label import TestLabel
27
+ from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
28
+ from typing import Optional, Set
29
+ from typing_extensions import Self
30
+
31
+ class DnsSecInstantTest(BaseModel):
32
+ """
33
+ DnsSecInstantTest
34
+ """ # noqa: E501
35
+ created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
36
+ created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
37
+ description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
38
+ live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
39
+ modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
40
+ modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
41
+ saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent")
42
+ 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")
43
+ test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
44
+ type: Optional[StrictStr] = None
45
+ links: Optional[TestLinks] = Field(default=None, alias="_links")
46
+ labels: Optional[List[TestLabel]] = None
47
+ shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
48
+ 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.")
49
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
50
+ agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
51
+ __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"]
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ extra="allow",
58
+ )
59
+
60
+
61
+ def to_str(self) -> str:
62
+ """Returns the string representation of the model using alias"""
63
+ return pprint.pformat(self.model_dump(by_alias=True))
64
+
65
+ def to_json(self) -> str:
66
+ """Returns the JSON representation of the model using alias"""
67
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
68
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
69
+
70
+ @classmethod
71
+ def from_json(cls, json_str: str) -> Optional[Self]:
72
+ """Create an instance of DnsSecInstantTest from a JSON string"""
73
+ return cls.from_dict(json.loads(json_str))
74
+
75
+ def to_dict(self) -> Dict[str, Any]:
76
+ """Return the dictionary representation of the model using alias.
77
+
78
+ This has the following differences from calling pydantic's
79
+ `self.model_dump(by_alias=True)`:
80
+
81
+ * `None` is only added to the output dict for nullable fields that
82
+ were set at model initialization. Other fields with value `None`
83
+ are ignored.
84
+ * OpenAPI `readOnly` fields are excluded.
85
+ * OpenAPI `readOnly` fields are excluded.
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
+ """
96
+ excluded_fields: Set[str] = set([
97
+ "created_by",
98
+ "created_date",
99
+ "live_share",
100
+ "modified_by",
101
+ "modified_date",
102
+ "saved_event",
103
+ "test_id",
104
+ "type",
105
+ "labels",
106
+ "shared_with_accounts",
107
+ "agents",
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 links
116
+ if self.links:
117
+ _dict['_links'] = self.links.to_dict()
118
+ # override the default output from pydantic by calling `to_dict()` of each item in labels (list)
119
+ _items = []
120
+ if self.labels:
121
+ for _item in self.labels:
122
+ if _item:
123
+ _items.append(_item.to_dict())
124
+ _dict['labels'] = _items
125
+ # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list)
126
+ _items = []
127
+ if self.shared_with_accounts:
128
+ for _item in self.shared_with_accounts:
129
+ if _item:
130
+ _items.append(_item.to_dict())
131
+ _dict['sharedWithAccounts'] = _items
132
+ # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
133
+ _items = []
134
+ if self.agents:
135
+ for _item in self.agents:
136
+ if _item:
137
+ _items.append(_item.to_dict())
138
+ _dict['agents'] = _items
139
+ return _dict
140
+
141
+ @classmethod
142
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
143
+ """Create an instance of DnsSecInstantTest from a dict"""
144
+ if obj is None:
145
+ return None
146
+
147
+ if not isinstance(obj, dict):
148
+ return cls.model_validate(obj)
149
+
150
+ _obj = cls.model_validate({
151
+ "createdBy": obj.get("createdBy"),
152
+ "createdDate": obj.get("createdDate"),
153
+ "description": obj.get("description"),
154
+ "liveShare": obj.get("liveShare"),
155
+ "modifiedBy": obj.get("modifiedBy"),
156
+ "modifiedDate": obj.get("modifiedDate"),
157
+ "savedEvent": obj.get("savedEvent"),
158
+ "testId": obj.get("testId"),
159
+ "testName": obj.get("testName"),
160
+ "type": obj.get("type"),
161
+ "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
162
+ "labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
163
+ "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
164
+ "domain": obj.get("domain"),
165
+ "dnsQueryClass": obj.get("dnsQueryClass"),
166
+ "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
167
+ })
168
+ return _obj
169
+
170
+
@@ -0,0 +1,148 @@
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.dns_query_class import DnsQueryClass
24
+ from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent
25
+ from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class DnsSecInstantTestRequest(BaseModel):
30
+ """
31
+ DnsSecInstantTestRequest
32
+ """ # noqa: E501
33
+ created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
34
+ created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
35
+ description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
36
+ live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
37
+ modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
38
+ modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
39
+ saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent")
40
+ 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")
41
+ test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
42
+ type: Optional[StrictStr] = None
43
+ links: Optional[TestLinks] = Field(default=None, alias="_links")
44
+ labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).")
45
+ 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")
46
+ 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.")
47
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
48
+ agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
49
+ __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"]
50
+
51
+ model_config = ConfigDict(
52
+ populate_by_name=True,
53
+ validate_assignment=True,
54
+ protected_namespaces=(),
55
+ extra="allow",
56
+ )
57
+
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.model_dump(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
67
+
68
+ @classmethod
69
+ def from_json(cls, json_str: str) -> Optional[Self]:
70
+ """Create an instance of DnsSecInstantTestRequest from a JSON string"""
71
+ return cls.from_dict(json.loads(json_str))
72
+
73
+ def to_dict(self) -> Dict[str, Any]:
74
+ """Return the dictionary representation of the model using alias.
75
+
76
+ This has the following differences from calling pydantic's
77
+ `self.model_dump(by_alias=True)`:
78
+
79
+ * `None` is only added to the output dict for nullable fields that
80
+ were set at model initialization. Other fields with value `None`
81
+ are ignored.
82
+ * OpenAPI `readOnly` fields are excluded.
83
+ * OpenAPI `readOnly` fields are excluded.
84
+ * OpenAPI `readOnly` fields are excluded.
85
+ * OpenAPI `readOnly` fields are excluded.
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
+ """
91
+ excluded_fields: Set[str] = set([
92
+ "created_by",
93
+ "created_date",
94
+ "live_share",
95
+ "modified_by",
96
+ "modified_date",
97
+ "saved_event",
98
+ "test_id",
99
+ "type",
100
+ ])
101
+
102
+ _dict = self.model_dump(
103
+ by_alias=True,
104
+ exclude=excluded_fields,
105
+ exclude_none=True,
106
+ )
107
+ # override the default output from pydantic by calling `to_dict()` of links
108
+ if self.links:
109
+ _dict['_links'] = self.links.to_dict()
110
+ # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
111
+ _items = []
112
+ if self.agents:
113
+ for _item in self.agents:
114
+ if _item:
115
+ _items.append(_item.to_dict())
116
+ _dict['agents'] = _items
117
+ return _dict
118
+
119
+ @classmethod
120
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
121
+ """Create an instance of DnsSecInstantTestRequest from a dict"""
122
+ if obj is None:
123
+ return None
124
+
125
+ if not isinstance(obj, dict):
126
+ return cls.model_validate(obj)
127
+
128
+ _obj = cls.model_validate({
129
+ "createdBy": obj.get("createdBy"),
130
+ "createdDate": obj.get("createdDate"),
131
+ "description": obj.get("description"),
132
+ "liveShare": obj.get("liveShare"),
133
+ "modifiedBy": obj.get("modifiedBy"),
134
+ "modifiedDate": obj.get("modifiedDate"),
135
+ "savedEvent": obj.get("savedEvent"),
136
+ "testId": obj.get("testId"),
137
+ "testName": obj.get("testName"),
138
+ "type": obj.get("type"),
139
+ "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
140
+ "labels": obj.get("labels"),
141
+ "sharedWithAccounts": obj.get("sharedWithAccounts"),
142
+ "domain": obj.get("domain"),
143
+ "dnsQueryClass": obj.get("dnsQueryClass"),
144
+ "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
145
+ })
146
+ return _obj
147
+
148
+
@@ -0,0 +1,95 @@
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 thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DnsSecProperties(BaseModel):
27
+ """
28
+ DnsSecProperties
29
+ """ # noqa: E501
30
+ 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.")
31
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
32
+ type: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["domain", "dnsQueryClass", "type"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ extra="allow",
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of DnsSecProperties from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * OpenAPI `readOnly` fields are excluded.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "type",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of DnsSecProperties from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "domain": obj.get("domain"),
90
+ "dnsQueryClass": obj.get("dnsQueryClass"),
91
+ "type": obj.get("type")
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,208 @@
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.agent import Agent
25
+ from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass
26
+ from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount
27
+ from thousandeyes_sdk.instant_tests.models.test_dns_server import TestDnsServer
28
+ from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol
29
+ from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy
30
+ from thousandeyes_sdk.instant_tests.models.test_label import TestLabel
31
+ from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
32
+ from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
33
+ from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
34
+ from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
35
+ from typing import Optional, Set
36
+ from typing_extensions import Self
37
+
38
+ class DnsServerInstantTest(BaseModel):
39
+ """
40
+ DnsServerInstantTest
41
+ """ # noqa: E501
42
+ created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy")
43
+ created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate")
44
+ description: Optional[StrictStr] = Field(default=None, description="A description of the test.")
45
+ live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare")
46
+ modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy")
47
+ modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate")
48
+ saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent")
49
+ 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")
50
+ test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName")
51
+ type: Optional[StrictStr] = None
52
+ links: Optional[TestLinks] = Field(default=None, alias="_links")
53
+ labels: Optional[List[TestLabel]] = None
54
+ shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts")
55
+ 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")
56
+ dns_servers: List[TestDnsServer] = Field(alias="dnsServers")
57
+ dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol")
58
+ 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.")
59
+ mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
60
+ 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")
61
+ 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")
62
+ path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
63
+ probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
64
+ protocol: Optional[TestProtocol] = None
65
+ recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries")
66
+ ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy")
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
+ dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass")
69
+ agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
70
+ __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"]
71
+
72
+ model_config = ConfigDict(
73
+ populate_by_name=True,
74
+ validate_assignment=True,
75
+ protected_namespaces=(),
76
+ extra="allow",
77
+ )
78
+
79
+
80
+ def to_str(self) -> str:
81
+ """Returns the string representation of the model using alias"""
82
+ return pprint.pformat(self.model_dump(by_alias=True))
83
+
84
+ def to_json(self) -> str:
85
+ """Returns the JSON representation of the model using alias"""
86
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
87
+ return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
88
+
89
+ @classmethod
90
+ def from_json(cls, json_str: str) -> Optional[Self]:
91
+ """Create an instance of DnsServerInstantTest from a JSON string"""
92
+ return cls.from_dict(json.loads(json_str))
93
+
94
+ def to_dict(self) -> Dict[str, Any]:
95
+ """Return the dictionary representation of the model using alias.
96
+
97
+ This has the following differences from calling pydantic's
98
+ `self.model_dump(by_alias=True)`:
99
+
100
+ * `None` is only added to the output dict for nullable fields that
101
+ were set at model initialization. Other fields with value `None`
102
+ are ignored.
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
+ * 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
+ "agents",
127
+ ])
128
+
129
+ _dict = self.model_dump(
130
+ by_alias=True,
131
+ exclude=excluded_fields,
132
+ exclude_none=True,
133
+ )
134
+ # override the default output from pydantic by calling `to_dict()` of links
135
+ if self.links:
136
+ _dict['_links'] = self.links.to_dict()
137
+ # override the default output from pydantic by calling `to_dict()` of each item in labels (list)
138
+ _items = []
139
+ if self.labels:
140
+ for _item in self.labels:
141
+ if _item:
142
+ _items.append(_item.to_dict())
143
+ _dict['labels'] = _items
144
+ # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list)
145
+ _items = []
146
+ if self.shared_with_accounts:
147
+ for _item in self.shared_with_accounts:
148
+ if _item:
149
+ _items.append(_item.to_dict())
150
+ _dict['sharedWithAccounts'] = _items
151
+ # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list)
152
+ _items = []
153
+ if self.dns_servers:
154
+ for _item in self.dns_servers:
155
+ if _item:
156
+ _items.append(_item.to_dict())
157
+ _dict['dnsServers'] = _items
158
+ # override the default output from pydantic by calling `to_dict()` of each item in agents (list)
159
+ _items = []
160
+ if self.agents:
161
+ for _item in self.agents:
162
+ if _item:
163
+ _items.append(_item.to_dict())
164
+ _dict['agents'] = _items
165
+ return _dict
166
+
167
+ @classmethod
168
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
169
+ """Create an instance of DnsServerInstantTest from a dict"""
170
+ if obj is None:
171
+ return None
172
+
173
+ if not isinstance(obj, dict):
174
+ return cls.model_validate(obj)
175
+
176
+ _obj = cls.model_validate({
177
+ "createdBy": obj.get("createdBy"),
178
+ "createdDate": obj.get("createdDate"),
179
+ "description": obj.get("description"),
180
+ "liveShare": obj.get("liveShare"),
181
+ "modifiedBy": obj.get("modifiedBy"),
182
+ "modifiedDate": obj.get("modifiedDate"),
183
+ "savedEvent": obj.get("savedEvent"),
184
+ "testId": obj.get("testId"),
185
+ "testName": obj.get("testName"),
186
+ "type": obj.get("type"),
187
+ "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
188
+ "labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
189
+ "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
190
+ "bandwidthMeasurements": obj.get("bandwidthMeasurements"),
191
+ "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None,
192
+ "dnsTransportProtocol": obj.get("dnsTransportProtocol"),
193
+ "domain": obj.get("domain"),
194
+ "mtuMeasurements": obj.get("mtuMeasurements"),
195
+ "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
196
+ "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
197
+ "pathTraceMode": obj.get("pathTraceMode"),
198
+ "probeMode": obj.get("probeMode"),
199
+ "protocol": obj.get("protocol"),
200
+ "recursiveQueries": obj.get("recursiveQueries"),
201
+ "ipv6Policy": obj.get("ipv6Policy"),
202
+ "fixedPacketRate": obj.get("fixedPacketRate"),
203
+ "dnsQueryClass": obj.get("dnsQueryClass"),
204
+ "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
205
+ })
206
+ return _obj
207
+
208
+