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.
- thousandeyes_sdk/instant_tests/__init__.py +117 -0
- thousandeyes_sdk/instant_tests/api/__init__.py +17 -0
- thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/agent_to_server_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/api_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/dns_security_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/dns_server_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/dns_trace_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/ftp_server_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/http_page_load_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/http_server_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/run_api.py +338 -0
- thousandeyes_sdk/instant_tests/api/sip_server_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/voice_api.py +376 -0
- thousandeyes_sdk/instant_tests/api/web_transaction_api.py +376 -0
- thousandeyes_sdk/instant_tests/models/__init__.py +100 -0
- thousandeyes_sdk/instant_tests/models/agent.py +125 -0
- thousandeyes_sdk/instant_tests/models/agent_base.py +98 -0
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +198 -0
- thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +176 -0
- thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +123 -0
- thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +37 -0
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +203 -0
- thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +181 -0
- thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +128 -0
- thousandeyes_sdk/instant_tests/models/api_instant_test.py +214 -0
- thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +192 -0
- thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +90 -0
- thousandeyes_sdk/instant_tests/models/api_properties.py +137 -0
- thousandeyes_sdk/instant_tests/models/api_request.py +138 -0
- thousandeyes_sdk/instant_tests/models/api_request_assertion.py +94 -0
- thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +37 -0
- thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +39 -0
- thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +38 -0
- thousandeyes_sdk/instant_tests/models/api_request_header.py +90 -0
- thousandeyes_sdk/instant_tests/models/api_request_method.py +40 -0
- thousandeyes_sdk/instant_tests/models/api_request_variable.py +90 -0
- thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +38 -0
- thousandeyes_sdk/instant_tests/models/dns_query_class.py +37 -0
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +170 -0
- thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +148 -0
- thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +95 -0
- thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +208 -0
- thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +178 -0
- thousandeyes_sdk/instant_tests/models/dns_server_properties.py +133 -0
- thousandeyes_sdk/instant_tests/models/dns_servers_request.py +88 -0
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +173 -0
- thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +151 -0
- thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +98 -0
- thousandeyes_sdk/instant_tests/models/error.py +96 -0
- thousandeyes_sdk/instant_tests/models/expand.py +38 -0
- thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +207 -0
- thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +132 -0
- thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +38 -0
- thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +246 -0
- thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +224 -0
- thousandeyes_sdk/instant_tests/models/http_server_properties.py +171 -0
- thousandeyes_sdk/instant_tests/models/instant_test.py +152 -0
- thousandeyes_sdk/instant_tests/models/instant_test_request.py +100 -0
- thousandeyes_sdk/instant_tests/models/link.py +102 -0
- thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +254 -0
- thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +232 -0
- thousandeyes_sdk/instant_tests/models/page_load_properties.py +179 -0
- thousandeyes_sdk/instant_tests/models/server_instant_test_request.py +185 -0
- thousandeyes_sdk/instant_tests/models/shared_with_account.py +90 -0
- thousandeyes_sdk/instant_tests/models/simple_agent.py +122 -0
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +191 -0
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +175 -0
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py +197 -0
- thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +204 -0
- thousandeyes_sdk/instant_tests/models/sip_server_properties.py +116 -0
- thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +38 -0
- thousandeyes_sdk/instant_tests/models/test_agent.py +90 -0
- thousandeyes_sdk/instant_tests/models/test_auth_type.py +40 -0
- thousandeyes_sdk/instant_tests/models/test_custom_headers.py +92 -0
- thousandeyes_sdk/instant_tests/models/test_direction.py +38 -0
- thousandeyes_sdk/instant_tests/models/test_dns_server.py +90 -0
- thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +37 -0
- thousandeyes_sdk/instant_tests/models/test_dscp_id.py +57 -0
- thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +39 -0
- thousandeyes_sdk/instant_tests/models/test_label.py +92 -0
- thousandeyes_sdk/instant_tests/models/test_links.py +102 -0
- thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +38 -0
- thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +37 -0
- thousandeyes_sdk/instant_tests/models/test_probe_mode.py +38 -0
- thousandeyes_sdk/instant_tests/models/test_protocol.py +38 -0
- thousandeyes_sdk/instant_tests/models/test_self_link.py +102 -0
- thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +100 -0
- thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +40 -0
- thousandeyes_sdk/instant_tests/models/test_type.py +48 -0
- thousandeyes_sdk/instant_tests/models/unauthorized_error.py +90 -0
- thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +128 -0
- thousandeyes_sdk/instant_tests/models/validation_error.py +111 -0
- thousandeyes_sdk/instant_tests/models/validation_error_item.py +92 -0
- thousandeyes_sdk/instant_tests/models/voice_instant_test.py +189 -0
- thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +167 -0
- thousandeyes_sdk/instant_tests/models/voice_properties.py +114 -0
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +258 -0
- thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +236 -0
- thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +181 -0
- thousandeyes_sdk/instant_tests/py.typed +0 -0
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/LICENSE +176 -0
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/METADATA +423 -0
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/NOTICE +7 -0
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/RECORD +107 -0
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/WHEEL +5 -0
- thousandeyes_sdk_instant_tests-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,100 @@
|
|
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.test_agent import TestAgent
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class InstantTestRequest(BaseModel):
|
27
|
+
"""
|
28
|
+
InstantTestRequest
|
29
|
+
""" # noqa: E501
|
30
|
+
labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).")
|
31
|
+
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")
|
32
|
+
agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).")
|
33
|
+
__properties: ClassVar[List[str]] = ["labels", "sharedWithAccounts", "agents"]
|
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 InstantTestRequest 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
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
76
|
+
_items = []
|
77
|
+
if self.agents:
|
78
|
+
for _item in self.agents:
|
79
|
+
if _item:
|
80
|
+
_items.append(_item.to_dict())
|
81
|
+
_dict['agents'] = _items
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of InstantTestRequest from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"labels": obj.get("labels"),
|
95
|
+
"sharedWithAccounts": obj.get("sharedWithAccounts"),
|
96
|
+
"agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
97
|
+
})
|
98
|
+
return _obj
|
99
|
+
|
100
|
+
|
@@ -0,0 +1,102 @@
|
|
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 import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class Link(BaseModel):
|
26
|
+
"""
|
27
|
+
A hyperlink from the containing resource to a URI.
|
28
|
+
""" # noqa: E501
|
29
|
+
href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].")
|
30
|
+
templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.")
|
31
|
+
type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.")
|
32
|
+
deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.")
|
33
|
+
name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.")
|
34
|
+
profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.")
|
35
|
+
title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier")
|
36
|
+
hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource")
|
37
|
+
__properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"]
|
38
|
+
|
39
|
+
model_config = ConfigDict(
|
40
|
+
populate_by_name=True,
|
41
|
+
validate_assignment=True,
|
42
|
+
protected_namespaces=(),
|
43
|
+
extra="allow",
|
44
|
+
)
|
45
|
+
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
+
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
+
"""Create an instance of Link from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
63
|
+
|
64
|
+
This has the following differences from calling pydantic's
|
65
|
+
`self.model_dump(by_alias=True)`:
|
66
|
+
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
68
|
+
were set at model initialization. Other fields with value `None`
|
69
|
+
are ignored.
|
70
|
+
"""
|
71
|
+
excluded_fields: Set[str] = set([
|
72
|
+
])
|
73
|
+
|
74
|
+
_dict = self.model_dump(
|
75
|
+
by_alias=True,
|
76
|
+
exclude=excluded_fields,
|
77
|
+
exclude_none=True,
|
78
|
+
)
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
+
"""Create an instance of Link from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return cls.model_validate(obj)
|
89
|
+
|
90
|
+
_obj = cls.model_validate({
|
91
|
+
"href": obj.get("href"),
|
92
|
+
"templated": obj.get("templated"),
|
93
|
+
"type": obj.get("type"),
|
94
|
+
"deprecation": obj.get("deprecation"),
|
95
|
+
"name": obj.get("name"),
|
96
|
+
"profile": obj.get("profile"),
|
97
|
+
"title": obj.get("title"),
|
98
|
+
"hreflang": obj.get("hreflang")
|
99
|
+
})
|
100
|
+
return _obj
|
101
|
+
|
102
|
+
|
@@ -0,0 +1,254 @@
|
|
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.shared_with_account import SharedWithAccount
|
26
|
+
from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType
|
27
|
+
from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders
|
28
|
+
from thousandeyes_sdk.instant_tests.models.test_label import TestLabel
|
29
|
+
from thousandeyes_sdk.instant_tests.models.test_links import TestLinks
|
30
|
+
from thousandeyes_sdk.instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy
|
31
|
+
from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode
|
32
|
+
from thousandeyes_sdk.instant_tests.models.test_probe_mode import TestProbeMode
|
33
|
+
from thousandeyes_sdk.instant_tests.models.test_protocol import TestProtocol
|
34
|
+
from thousandeyes_sdk.instant_tests.models.test_ssl_version_id import TestSslVersionId
|
35
|
+
from typing import Optional, Set
|
36
|
+
from typing_extensions import Self
|
37
|
+
|
38
|
+
class PageLoadInstantTest(BaseModel):
|
39
|
+
"""
|
40
|
+
PageLoadInstantTest
|
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
|
+
auth_type: Optional[TestAuthType] = Field(default=None, alias="authType")
|
56
|
+
bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements")
|
57
|
+
client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate")
|
58
|
+
content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex")
|
59
|
+
custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders")
|
60
|
+
desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode")
|
61
|
+
emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId")
|
62
|
+
follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects")
|
63
|
+
http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime")
|
64
|
+
http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit")
|
65
|
+
http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion")
|
66
|
+
include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders")
|
67
|
+
mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements")
|
68
|
+
network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements")
|
69
|
+
num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces")
|
70
|
+
page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime")
|
71
|
+
page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit")
|
72
|
+
password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.")
|
73
|
+
path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode")
|
74
|
+
probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode")
|
75
|
+
protocol: Optional[TestProtocol] = None
|
76
|
+
ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion")
|
77
|
+
ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId")
|
78
|
+
url: StrictStr = Field(description="Target for the test.")
|
79
|
+
use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm")
|
80
|
+
user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent")
|
81
|
+
username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.")
|
82
|
+
verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate")
|
83
|
+
allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation")
|
84
|
+
block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains")
|
85
|
+
disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot")
|
86
|
+
allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera")
|
87
|
+
allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation")
|
88
|
+
browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage")
|
89
|
+
page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy")
|
90
|
+
fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate")
|
91
|
+
override_agent_proxy: Optional[StrictBool] = Field(default=False, description="Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.", alias="overrideAgentProxy")
|
92
|
+
override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId")
|
93
|
+
agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.")
|
94
|
+
__properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "emulatedDeviceId", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "agents"]
|
95
|
+
|
96
|
+
model_config = ConfigDict(
|
97
|
+
populate_by_name=True,
|
98
|
+
validate_assignment=True,
|
99
|
+
protected_namespaces=(),
|
100
|
+
extra="allow",
|
101
|
+
)
|
102
|
+
|
103
|
+
|
104
|
+
def to_str(self) -> str:
|
105
|
+
"""Returns the string representation of the model using alias"""
|
106
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
107
|
+
|
108
|
+
def to_json(self) -> str:
|
109
|
+
"""Returns the JSON representation of the model using alias"""
|
110
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
111
|
+
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
112
|
+
|
113
|
+
@classmethod
|
114
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
115
|
+
"""Create an instance of PageLoadInstantTest from a JSON string"""
|
116
|
+
return cls.from_dict(json.loads(json_str))
|
117
|
+
|
118
|
+
def to_dict(self) -> Dict[str, Any]:
|
119
|
+
"""Return the dictionary representation of the model using alias.
|
120
|
+
|
121
|
+
This has the following differences from calling pydantic's
|
122
|
+
`self.model_dump(by_alias=True)`:
|
123
|
+
|
124
|
+
* `None` is only added to the output dict for nullable fields that
|
125
|
+
were set at model initialization. Other fields with value `None`
|
126
|
+
are ignored.
|
127
|
+
* OpenAPI `readOnly` fields are excluded.
|
128
|
+
* OpenAPI `readOnly` fields are excluded.
|
129
|
+
* OpenAPI `readOnly` fields are excluded.
|
130
|
+
* OpenAPI `readOnly` fields are excluded.
|
131
|
+
* OpenAPI `readOnly` fields are excluded.
|
132
|
+
* OpenAPI `readOnly` fields are excluded.
|
133
|
+
* OpenAPI `readOnly` fields are excluded.
|
134
|
+
* OpenAPI `readOnly` fields are excluded.
|
135
|
+
* OpenAPI `readOnly` fields are excluded.
|
136
|
+
* OpenAPI `readOnly` fields are excluded.
|
137
|
+
* OpenAPI `readOnly` fields are excluded.
|
138
|
+
* OpenAPI `readOnly` fields are excluded.
|
139
|
+
"""
|
140
|
+
excluded_fields: Set[str] = set([
|
141
|
+
"created_by",
|
142
|
+
"created_date",
|
143
|
+
"live_share",
|
144
|
+
"modified_by",
|
145
|
+
"modified_date",
|
146
|
+
"saved_event",
|
147
|
+
"test_id",
|
148
|
+
"type",
|
149
|
+
"labels",
|
150
|
+
"shared_with_accounts",
|
151
|
+
"ssl_version",
|
152
|
+
"agents",
|
153
|
+
])
|
154
|
+
|
155
|
+
_dict = self.model_dump(
|
156
|
+
by_alias=True,
|
157
|
+
exclude=excluded_fields,
|
158
|
+
exclude_none=True,
|
159
|
+
)
|
160
|
+
# override the default output from pydantic by calling `to_dict()` of links
|
161
|
+
if self.links:
|
162
|
+
_dict['_links'] = self.links.to_dict()
|
163
|
+
# override the default output from pydantic by calling `to_dict()` of each item in labels (list)
|
164
|
+
_items = []
|
165
|
+
if self.labels:
|
166
|
+
for _item in self.labels:
|
167
|
+
if _item:
|
168
|
+
_items.append(_item.to_dict())
|
169
|
+
_dict['labels'] = _items
|
170
|
+
# override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list)
|
171
|
+
_items = []
|
172
|
+
if self.shared_with_accounts:
|
173
|
+
for _item in self.shared_with_accounts:
|
174
|
+
if _item:
|
175
|
+
_items.append(_item.to_dict())
|
176
|
+
_dict['sharedWithAccounts'] = _items
|
177
|
+
# override the default output from pydantic by calling `to_dict()` of custom_headers
|
178
|
+
if self.custom_headers:
|
179
|
+
_dict['customHeaders'] = self.custom_headers.to_dict()
|
180
|
+
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
|
181
|
+
_items = []
|
182
|
+
if self.agents:
|
183
|
+
for _item in self.agents:
|
184
|
+
if _item:
|
185
|
+
_items.append(_item.to_dict())
|
186
|
+
_dict['agents'] = _items
|
187
|
+
return _dict
|
188
|
+
|
189
|
+
@classmethod
|
190
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
191
|
+
"""Create an instance of PageLoadInstantTest from a dict"""
|
192
|
+
if obj is None:
|
193
|
+
return None
|
194
|
+
|
195
|
+
if not isinstance(obj, dict):
|
196
|
+
return cls.model_validate(obj)
|
197
|
+
|
198
|
+
_obj = cls.model_validate({
|
199
|
+
"createdBy": obj.get("createdBy"),
|
200
|
+
"createdDate": obj.get("createdDate"),
|
201
|
+
"description": obj.get("description"),
|
202
|
+
"liveShare": obj.get("liveShare"),
|
203
|
+
"modifiedBy": obj.get("modifiedBy"),
|
204
|
+
"modifiedDate": obj.get("modifiedDate"),
|
205
|
+
"savedEvent": obj.get("savedEvent"),
|
206
|
+
"testId": obj.get("testId"),
|
207
|
+
"testName": obj.get("testName"),
|
208
|
+
"type": obj.get("type"),
|
209
|
+
"_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
210
|
+
"labels": [TestLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
211
|
+
"sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None,
|
212
|
+
"authType": obj.get("authType"),
|
213
|
+
"bandwidthMeasurements": obj.get("bandwidthMeasurements"),
|
214
|
+
"clientCertificate": obj.get("clientCertificate"),
|
215
|
+
"contentRegex": obj.get("contentRegex"),
|
216
|
+
"customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None,
|
217
|
+
"desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200',
|
218
|
+
"emulatedDeviceId": obj.get("emulatedDeviceId"),
|
219
|
+
"followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True,
|
220
|
+
"httpTargetTime": obj.get("httpTargetTime"),
|
221
|
+
"httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5,
|
222
|
+
"httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2,
|
223
|
+
"includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True,
|
224
|
+
"mtuMeasurements": obj.get("mtuMeasurements"),
|
225
|
+
"networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True,
|
226
|
+
"numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3,
|
227
|
+
"pageLoadTargetTime": obj.get("pageLoadTargetTime"),
|
228
|
+
"pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10,
|
229
|
+
"password": obj.get("password"),
|
230
|
+
"pathTraceMode": obj.get("pathTraceMode"),
|
231
|
+
"probeMode": obj.get("probeMode"),
|
232
|
+
"protocol": obj.get("protocol"),
|
233
|
+
"sslVersion": obj.get("sslVersion"),
|
234
|
+
"sslVersionId": obj.get("sslVersionId"),
|
235
|
+
"url": obj.get("url"),
|
236
|
+
"useNtlm": obj.get("useNtlm"),
|
237
|
+
"userAgent": obj.get("userAgent"),
|
238
|
+
"username": obj.get("username"),
|
239
|
+
"verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False,
|
240
|
+
"allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True,
|
241
|
+
"blockDomains": obj.get("blockDomains"),
|
242
|
+
"disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False,
|
243
|
+
"allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False,
|
244
|
+
"allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False,
|
245
|
+
"browserLanguage": obj.get("browserLanguage"),
|
246
|
+
"pageLoadingStrategy": obj.get("pageLoadingStrategy"),
|
247
|
+
"fixedPacketRate": obj.get("fixedPacketRate"),
|
248
|
+
"overrideAgentProxy": obj.get("overrideAgentProxy") if obj.get("overrideAgentProxy") is not None else False,
|
249
|
+
"overrideProxyId": obj.get("overrideProxyId"),
|
250
|
+
"agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
|
251
|
+
})
|
252
|
+
return _obj
|
253
|
+
|
254
|
+
|