audithub-sdk 0.1.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.
- audithub_sdk/__init__.py +410 -0
- audithub_sdk/api/__init__.py +22 -0
- audithub_sdk/api/admin_api.py +6117 -0
- audithub_sdk/api/configuration_api.py +520 -0
- audithub_sdk/api/custom_detectors_org_lib_api.py +1461 -0
- audithub_sdk/api/custom_detectors_std_lib_api.py +546 -0
- audithub_sdk/api/editor_languages_api.py +1383 -0
- audithub_sdk/api/generic_api.py +1275 -0
- audithub_sdk/api/hints_org_lib_api.py +2049 -0
- audithub_sdk/api/hints_std_lib_api.py +546 -0
- audithub_sdk/api/issues_api.py +2742 -0
- audithub_sdk/api/organizations_api.py +12148 -0
- audithub_sdk/api/projects_api.py +7069 -0
- audithub_sdk/api/subscriptions_api.py +1490 -0
- audithub_sdk/api/tasks_api.py +4276 -0
- audithub_sdk/api/tools_api.py +2298 -0
- audithub_sdk/api/users_api.py +2657 -0
- audithub_sdk/api/v_specs_org_lib_api.py +1461 -0
- audithub_sdk/api/v_specs_std_lib_api.py +546 -0
- audithub_sdk/api/versions_api.py +5419 -0
- audithub_sdk/api_client.py +808 -0
- audithub_sdk/api_response.py +21 -0
- audithub_sdk/configuration.py +572 -0
- audithub_sdk/exceptions.py +218 -0
- audithub_sdk/models/__init__.py +180 -0
- audithub_sdk/models/accounting_data.py +138 -0
- audithub_sdk/models/active_organization_users.py +120 -0
- audithub_sdk/models/admin_resource_patch.py +94 -0
- audithub_sdk/models/api_blacklisted_hint.py +96 -0
- audithub_sdk/models/api_key.py +89 -0
- audithub_sdk/models/api_key_base.py +87 -0
- audithub_sdk/models/api_key_with_secret.py +91 -0
- audithub_sdk/models/application_function.py +97 -0
- audithub_sdk/models/archive_input.py +104 -0
- audithub_sdk/models/artifact.py +102 -0
- audithub_sdk/models/comment.py +121 -0
- audithub_sdk/models/comment_with_mutations.py +121 -0
- audithub_sdk/models/container_resources.py +93 -0
- audithub_sdk/models/contents_inner.py +136 -0
- audithub_sdk/models/custom_detector.py +101 -0
- audithub_sdk/models/custom_detector_from_organization_library.py +99 -0
- audithub_sdk/models/custom_detector_from_standard_library.py +108 -0
- audithub_sdk/models/custom_detector_from_version.py +99 -0
- audithub_sdk/models/custom_detector_with_id.py +103 -0
- audithub_sdk/models/data.py +134 -0
- audithub_sdk/models/defi_vanguard_v2_input.py +93 -0
- audithub_sdk/models/defi_vanguard_v2_parameters.py +132 -0
- audithub_sdk/models/directory.py +111 -0
- audithub_sdk/models/editor_language.py +99 -0
- audithub_sdk/models/editor_language_with_id.py +101 -0
- audithub_sdk/models/effective_user_access_restriction.py +94 -0
- audithub_sdk/models/env_var.py +89 -0
- audithub_sdk/models/extra_function_arguments.py +107 -0
- audithub_sdk/models/favorite_project_assignment.py +87 -0
- audithub_sdk/models/file.py +101 -0
- audithub_sdk/models/file_thread_subject.py +103 -0
- audithub_sdk/models/finding_action.py +101 -0
- audithub_sdk/models/finding_action_base.py +96 -0
- audithub_sdk/models/finding_reference.py +91 -0
- audithub_sdk/models/finding_thread_subject.py +103 -0
- audithub_sdk/models/fio_data.py +113 -0
- audithub_sdk/models/fork_network_public.py +89 -0
- audithub_sdk/models/fuzzing_blacklist_entry.py +89 -0
- audithub_sdk/models/git_input.py +113 -0
- audithub_sdk/models/hint.py +101 -0
- audithub_sdk/models/hint_ad_hoc.py +113 -0
- audithub_sdk/models/hint_from_organization_library.py +99 -0
- audithub_sdk/models/hint_from_standard_library.py +108 -0
- audithub_sdk/models/hint_from_version.py +99 -0
- audithub_sdk/models/hint_with_id.py +103 -0
- audithub_sdk/models/http_validation_error.py +95 -0
- audithub_sdk/models/id_and_message_response.py +89 -0
- audithub_sdk/models/included_user_info.py +87 -0
- audithub_sdk/models/input_info.py +134 -0
- audithub_sdk/models/invitation.py +128 -0
- audithub_sdk/models/invitation_patch.py +94 -0
- audithub_sdk/models/invited_user.py +101 -0
- audithub_sdk/models/issue.py +138 -0
- audithub_sdk/models/issue_action.py +93 -0
- audithub_sdk/models/issue_batch_announce.py +88 -0
- audithub_sdk/models/issue_complete.py +167 -0
- audithub_sdk/models/issue_configuration_options.py +125 -0
- audithub_sdk/models/issue_details.py +110 -0
- audithub_sdk/models/issue_for_list.py +118 -0
- audithub_sdk/models/issue_impact.py +89 -0
- audithub_sdk/models/issue_info_base_complete.py +126 -0
- audithub_sdk/models/issue_info_editable.py +142 -0
- audithub_sdk/models/issue_likelihood.py +89 -0
- audithub_sdk/models/issue_patch.py +103 -0
- audithub_sdk/models/issue_resolution.py +100 -0
- audithub_sdk/models/issue_severity.py +89 -0
- audithub_sdk/models/issue_state_transition_function.py +110 -0
- audithub_sdk/models/issue_status.py +91 -0
- audithub_sdk/models/issue_status_transition.py +104 -0
- audithub_sdk/models/issue_thread_subject.py +99 -0
- audithub_sdk/models/issue_type.py +91 -0
- audithub_sdk/models/issue_type_info.py +87 -0
- audithub_sdk/models/machine_info.py +109 -0
- audithub_sdk/models/model_tool_input.py +102 -0
- audithub_sdk/models/model_tool_phase_parameters.py +169 -0
- audithub_sdk/models/new_invitation.py +103 -0
- audithub_sdk/models/new_organization.py +101 -0
- audithub_sdk/models/new_organization_package.py +132 -0
- audithub_sdk/models/new_organization_subscription.py +125 -0
- audithub_sdk/models/npm_project_dependency.py +103 -0
- audithub_sdk/models/onboarding_request.py +113 -0
- audithub_sdk/models/or_ca_input.py +134 -0
- audithub_sdk/models/or_ca_parameters.py +149 -0
- audithub_sdk/models/orca_value.py +138 -0
- audithub_sdk/models/organization.py +108 -0
- audithub_sdk/models/organization_access_restriction.py +101 -0
- audithub_sdk/models/organization_active_quota.py +104 -0
- audithub_sdk/models/organization_admin.py +110 -0
- audithub_sdk/models/organization_consumption.py +104 -0
- audithub_sdk/models/organization_quota.py +96 -0
- audithub_sdk/models/organization_subscription.py +135 -0
- audithub_sdk/models/package_data.py +140 -0
- audithub_sdk/models/package_subscription.py +103 -0
- audithub_sdk/models/patch_user.py +108 -0
- audithub_sdk/models/pending_finding_actions.py +99 -0
- audithub_sdk/models/picus_input.py +93 -0
- audithub_sdk/models/picus_parameters.py +111 -0
- audithub_sdk/models/picus_v2_input.py +93 -0
- audithub_sdk/models/picus_v2_parameters.py +195 -0
- audithub_sdk/models/project.py +200 -0
- audithub_sdk/models/project_admin.py +206 -0
- audithub_sdk/models/project_data.py +97 -0
- audithub_sdk/models/project_dependency.py +103 -0
- audithub_sdk/models/project_git_hub_link.py +87 -0
- audithub_sdk/models/project_info_input.py +186 -0
- audithub_sdk/models/project_info_output.py +186 -0
- audithub_sdk/models/project_thread_subject.py +97 -0
- audithub_sdk/models/project_update_response.py +93 -0
- audithub_sdk/models/psa.py +96 -0
- audithub_sdk/models/psa_message.py +94 -0
- audithub_sdk/models/public_configuration.py +216 -0
- audithub_sdk/models/put_user.py +91 -0
- audithub_sdk/models/registered_user.py +94 -0
- audithub_sdk/models/resource_patch.py +94 -0
- audithub_sdk/models/resources.py +87 -0
- audithub_sdk/models/root_model_list_union_custom_detector_from_version_custom_detector_from_standard_library_custom_detector_from_organization_library_inner.py +149 -0
- audithub_sdk/models/root_model_list_union_hint_from_version_hint_from_standard_library_hint_from_organization_library_hint_ad_hoc_inner.py +164 -0
- audithub_sdk/models/root_model_list_union_v_spec_from_version_v_spec_from_standard_library_v_spec_from_organization_library_v_spec_ad_hoc_inner.py +164 -0
- audithub_sdk/models/security_tool.py +89 -0
- audithub_sdk/models/self_onboard_request.py +94 -0
- audithub_sdk/models/source_reference.py +103 -0
- audithub_sdk/models/step_definition.py +91 -0
- audithub_sdk/models/step_resources.py +103 -0
- audithub_sdk/models/subject.py +168 -0
- audithub_sdk/models/success_and_message_response.py +93 -0
- audithub_sdk/models/task.py +184 -0
- audithub_sdk/models/task_admin.py +144 -0
- audithub_sdk/models/task_creation.py +89 -0
- audithub_sdk/models/task_fio_data.py +97 -0
- audithub_sdk/models/task_patch.py +94 -0
- audithub_sdk/models/task_resources.py +103 -0
- audithub_sdk/models/task_status.py +94 -0
- audithub_sdk/models/task_step.py +145 -0
- audithub_sdk/models/temp_version.py +93 -0
- audithub_sdk/models/thread.py +146 -0
- audithub_sdk/models/thread_comment.py +87 -0
- audithub_sdk/models/thread_patch.py +101 -0
- audithub_sdk/models/user.py +106 -0
- audithub_sdk/models/user_access_restriction.py +108 -0
- audithub_sdk/models/user_for_admin.py +108 -0
- audithub_sdk/models/user_group.py +89 -0
- audithub_sdk/models/user_information.py +89 -0
- audithub_sdk/models/user_organization_setting.py +89 -0
- audithub_sdk/models/user_patch.py +103 -0
- audithub_sdk/models/user_project_setting.py +89 -0
- audithub_sdk/models/user_thread_setting.py +89 -0
- audithub_sdk/models/user_to_organization_assignment.py +87 -0
- audithub_sdk/models/v_spec.py +101 -0
- audithub_sdk/models/v_spec_ad_hoc.py +113 -0
- audithub_sdk/models/v_spec_from_organization_library.py +99 -0
- audithub_sdk/models/v_spec_from_standard_library.py +108 -0
- audithub_sdk/models/v_spec_from_version.py +99 -0
- audithub_sdk/models/v_spec_with_id.py +103 -0
- audithub_sdk/models/validation_error.py +108 -0
- audithub_sdk/models/vanguard_detector.py +91 -0
- audithub_sdk/models/version.py +134 -0
- audithub_sdk/models/version_admin.py +142 -0
- audithub_sdk/models/version_data.py +103 -0
- audithub_sdk/models/version_patch.py +120 -0
- audithub_sdk/models/version_resources.py +103 -0
- audithub_sdk/models/zk_vanguard_input.py +93 -0
- audithub_sdk/models/zk_vanguard_parameters.py +108 -0
- audithub_sdk/models/zk_vanguard_v2_input.py +93 -0
- audithub_sdk/models/zk_vanguard_v2_parameters.py +108 -0
- audithub_sdk/py.typed +0 -0
- audithub_sdk/rest.py +199 -0
- audithub_sdk-0.1.0.dist-info/METADATA +129 -0
- audithub_sdk-0.1.0.dist-info/RECORD +197 -0
- audithub_sdk-0.1.0.dist-info/WHEEL +5 -0
- audithub_sdk-0.1.0.dist-info/top_level.txt +2 -0
- audithub_sdk_ext/__init__.py +11 -0
- audithub_sdk_ext/auth.py +207 -0
|
@@ -0,0 +1,1461 @@
|
|
|
1
|
+
"""
|
|
2
|
+
FastAPI
|
|
3
|
+
|
|
4
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import StrictInt
|
|
19
|
+
from typing import List
|
|
20
|
+
from audithub_sdk.models.custom_detector import CustomDetector
|
|
21
|
+
from audithub_sdk.models.custom_detector_with_id import CustomDetectorWithId
|
|
22
|
+
from audithub_sdk.models.id_and_message_response import IdAndMessageResponse
|
|
23
|
+
from audithub_sdk.models.success_and_message_response import SuccessAndMessageResponse
|
|
24
|
+
|
|
25
|
+
from audithub_sdk.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from audithub_sdk.api_response import ApiResponse
|
|
27
|
+
from audithub_sdk.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class CustomDetectorsOrgLibApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
async def delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete(
|
|
45
|
+
self,
|
|
46
|
+
organization_id: StrictInt,
|
|
47
|
+
custom_detector_id: StrictInt,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> SuccessAndMessageResponse:
|
|
61
|
+
"""Delete Custom Detector
|
|
62
|
+
|
|
63
|
+
Permanently delete a custom detector
|
|
64
|
+
|
|
65
|
+
:param organization_id: (required)
|
|
66
|
+
:type organization_id: int
|
|
67
|
+
:param custom_detector_id: (required)
|
|
68
|
+
:type custom_detector_id: int
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete_serialize(
|
|
92
|
+
organization_id=organization_id,
|
|
93
|
+
custom_detector_id=custom_detector_id,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "SuccessAndMessageResponse",
|
|
102
|
+
'422': "HTTPValidationError",
|
|
103
|
+
}
|
|
104
|
+
response_data = await self.api_client.call_api(
|
|
105
|
+
*_param,
|
|
106
|
+
_request_timeout=_request_timeout
|
|
107
|
+
)
|
|
108
|
+
await response_data.read()
|
|
109
|
+
return self.api_client.response_deserialize(
|
|
110
|
+
response_data=response_data,
|
|
111
|
+
response_types_map=_response_types_map,
|
|
112
|
+
).data
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@validate_call
|
|
116
|
+
async def delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
organization_id: StrictInt,
|
|
119
|
+
custom_detector_id: StrictInt,
|
|
120
|
+
_request_timeout: Union[
|
|
121
|
+
None,
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Tuple[
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
126
|
+
]
|
|
127
|
+
] = None,
|
|
128
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_content_type: Optional[StrictStr] = None,
|
|
130
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
132
|
+
) -> ApiResponse[SuccessAndMessageResponse]:
|
|
133
|
+
"""Delete Custom Detector
|
|
134
|
+
|
|
135
|
+
Permanently delete a custom detector
|
|
136
|
+
|
|
137
|
+
:param organization_id: (required)
|
|
138
|
+
:type organization_id: int
|
|
139
|
+
:param custom_detector_id: (required)
|
|
140
|
+
:type custom_detector_id: int
|
|
141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
142
|
+
number provided, it will be total request
|
|
143
|
+
timeout. It can also be a pair (tuple) of
|
|
144
|
+
(connection, read) timeouts.
|
|
145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
147
|
+
request; this effectively ignores the
|
|
148
|
+
authentication in the spec for a single request.
|
|
149
|
+
:type _request_auth: dict, optional
|
|
150
|
+
:param _content_type: force content-type for the request.
|
|
151
|
+
:type _content_type: str, Optional
|
|
152
|
+
:param _headers: set to override the headers for a single
|
|
153
|
+
request; this effectively ignores the headers
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _headers: dict, optional
|
|
156
|
+
:param _host_index: set to override the host_index for a single
|
|
157
|
+
request; this effectively ignores the host_index
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _host_index: int, optional
|
|
160
|
+
:return: Returns the result object.
|
|
161
|
+
""" # noqa: E501
|
|
162
|
+
|
|
163
|
+
_param = self._delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete_serialize(
|
|
164
|
+
organization_id=organization_id,
|
|
165
|
+
custom_detector_id=custom_detector_id,
|
|
166
|
+
_request_auth=_request_auth,
|
|
167
|
+
_content_type=_content_type,
|
|
168
|
+
_headers=_headers,
|
|
169
|
+
_host_index=_host_index
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
173
|
+
'200': "SuccessAndMessageResponse",
|
|
174
|
+
'422': "HTTPValidationError",
|
|
175
|
+
}
|
|
176
|
+
response_data = await self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
await response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
async def delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
organization_id: StrictInt,
|
|
191
|
+
custom_detector_id: StrictInt,
|
|
192
|
+
_request_timeout: Union[
|
|
193
|
+
None,
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Tuple[
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
198
|
+
]
|
|
199
|
+
] = None,
|
|
200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
_content_type: Optional[StrictStr] = None,
|
|
202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
204
|
+
) -> RESTResponseType:
|
|
205
|
+
"""Delete Custom Detector
|
|
206
|
+
|
|
207
|
+
Permanently delete a custom detector
|
|
208
|
+
|
|
209
|
+
:param organization_id: (required)
|
|
210
|
+
:type organization_id: int
|
|
211
|
+
:param custom_detector_id: (required)
|
|
212
|
+
:type custom_detector_id: int
|
|
213
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
214
|
+
number provided, it will be total request
|
|
215
|
+
timeout. It can also be a pair (tuple) of
|
|
216
|
+
(connection, read) timeouts.
|
|
217
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
218
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
219
|
+
request; this effectively ignores the
|
|
220
|
+
authentication in the spec for a single request.
|
|
221
|
+
:type _request_auth: dict, optional
|
|
222
|
+
:param _content_type: force content-type for the request.
|
|
223
|
+
:type _content_type: str, Optional
|
|
224
|
+
:param _headers: set to override the headers for a single
|
|
225
|
+
request; this effectively ignores the headers
|
|
226
|
+
in the spec for a single request.
|
|
227
|
+
:type _headers: dict, optional
|
|
228
|
+
:param _host_index: set to override the host_index for a single
|
|
229
|
+
request; this effectively ignores the host_index
|
|
230
|
+
in the spec for a single request.
|
|
231
|
+
:type _host_index: int, optional
|
|
232
|
+
:return: Returns the result object.
|
|
233
|
+
""" # noqa: E501
|
|
234
|
+
|
|
235
|
+
_param = self._delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete_serialize(
|
|
236
|
+
organization_id=organization_id,
|
|
237
|
+
custom_detector_id=custom_detector_id,
|
|
238
|
+
_request_auth=_request_auth,
|
|
239
|
+
_content_type=_content_type,
|
|
240
|
+
_headers=_headers,
|
|
241
|
+
_host_index=_host_index
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
245
|
+
'200': "SuccessAndMessageResponse",
|
|
246
|
+
'422': "HTTPValidationError",
|
|
247
|
+
}
|
|
248
|
+
response_data = await self.api_client.call_api(
|
|
249
|
+
*_param,
|
|
250
|
+
_request_timeout=_request_timeout
|
|
251
|
+
)
|
|
252
|
+
return response_data.response
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _delete_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_delete_serialize(
|
|
256
|
+
self,
|
|
257
|
+
organization_id,
|
|
258
|
+
custom_detector_id,
|
|
259
|
+
_request_auth,
|
|
260
|
+
_content_type,
|
|
261
|
+
_headers,
|
|
262
|
+
_host_index,
|
|
263
|
+
) -> RequestSerialized:
|
|
264
|
+
|
|
265
|
+
_host = None
|
|
266
|
+
|
|
267
|
+
_collection_formats: Dict[str, str] = {
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
_path_params: Dict[str, str] = {}
|
|
271
|
+
_query_params: List[Tuple[str, str]] = []
|
|
272
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
273
|
+
_form_params: List[Tuple[str, str]] = []
|
|
274
|
+
_files: Dict[
|
|
275
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
276
|
+
] = {}
|
|
277
|
+
_body_params: Optional[bytes] = None
|
|
278
|
+
|
|
279
|
+
# process the path parameters
|
|
280
|
+
if organization_id is not None:
|
|
281
|
+
_path_params['organization_id'] = organization_id
|
|
282
|
+
if custom_detector_id is not None:
|
|
283
|
+
_path_params['custom_detector_id'] = custom_detector_id
|
|
284
|
+
# process the query parameters
|
|
285
|
+
# process the header parameters
|
|
286
|
+
# process the form parameters
|
|
287
|
+
# process the body parameter
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
# set the HTTP header `Accept`
|
|
291
|
+
if 'Accept' not in _header_params:
|
|
292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
293
|
+
[
|
|
294
|
+
'application/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
# authentication setting
|
|
300
|
+
_auth_settings: List[str] = [
|
|
301
|
+
'OpenIdConnect'
|
|
302
|
+
]
|
|
303
|
+
|
|
304
|
+
return self.api_client.param_serialize(
|
|
305
|
+
method='DELETE',
|
|
306
|
+
resource_path='/organizations/{organization_id}/custom_detectors/{custom_detector_id}',
|
|
307
|
+
path_params=_path_params,
|
|
308
|
+
query_params=_query_params,
|
|
309
|
+
header_params=_header_params,
|
|
310
|
+
body=_body_params,
|
|
311
|
+
post_params=_form_params,
|
|
312
|
+
files=_files,
|
|
313
|
+
auth_settings=_auth_settings,
|
|
314
|
+
collection_formats=_collection_formats,
|
|
315
|
+
_host=_host,
|
|
316
|
+
_request_auth=_request_auth
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
@validate_call
|
|
323
|
+
async def get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get(
|
|
324
|
+
self,
|
|
325
|
+
organization_id: StrictInt,
|
|
326
|
+
custom_detector_id: StrictInt,
|
|
327
|
+
_request_timeout: Union[
|
|
328
|
+
None,
|
|
329
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
330
|
+
Tuple[
|
|
331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
332
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
333
|
+
]
|
|
334
|
+
] = None,
|
|
335
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
336
|
+
_content_type: Optional[StrictStr] = None,
|
|
337
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
338
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
339
|
+
) -> CustomDetector:
|
|
340
|
+
"""Get Custom Detector
|
|
341
|
+
|
|
342
|
+
Returns custom detector attributes
|
|
343
|
+
|
|
344
|
+
:param organization_id: (required)
|
|
345
|
+
:type organization_id: int
|
|
346
|
+
:param custom_detector_id: (required)
|
|
347
|
+
:type custom_detector_id: int
|
|
348
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
349
|
+
number provided, it will be total request
|
|
350
|
+
timeout. It can also be a pair (tuple) of
|
|
351
|
+
(connection, read) timeouts.
|
|
352
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
353
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
354
|
+
request; this effectively ignores the
|
|
355
|
+
authentication in the spec for a single request.
|
|
356
|
+
:type _request_auth: dict, optional
|
|
357
|
+
:param _content_type: force content-type for the request.
|
|
358
|
+
:type _content_type: str, Optional
|
|
359
|
+
:param _headers: set to override the headers for a single
|
|
360
|
+
request; this effectively ignores the headers
|
|
361
|
+
in the spec for a single request.
|
|
362
|
+
:type _headers: dict, optional
|
|
363
|
+
:param _host_index: set to override the host_index for a single
|
|
364
|
+
request; this effectively ignores the host_index
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _host_index: int, optional
|
|
367
|
+
:return: Returns the result object.
|
|
368
|
+
""" # noqa: E501
|
|
369
|
+
|
|
370
|
+
_param = self._get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get_serialize(
|
|
371
|
+
organization_id=organization_id,
|
|
372
|
+
custom_detector_id=custom_detector_id,
|
|
373
|
+
_request_auth=_request_auth,
|
|
374
|
+
_content_type=_content_type,
|
|
375
|
+
_headers=_headers,
|
|
376
|
+
_host_index=_host_index
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
380
|
+
'200': "CustomDetector",
|
|
381
|
+
'422': "HTTPValidationError",
|
|
382
|
+
}
|
|
383
|
+
response_data = await self.api_client.call_api(
|
|
384
|
+
*_param,
|
|
385
|
+
_request_timeout=_request_timeout
|
|
386
|
+
)
|
|
387
|
+
await response_data.read()
|
|
388
|
+
return self.api_client.response_deserialize(
|
|
389
|
+
response_data=response_data,
|
|
390
|
+
response_types_map=_response_types_map,
|
|
391
|
+
).data
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
@validate_call
|
|
395
|
+
async def get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get_with_http_info(
|
|
396
|
+
self,
|
|
397
|
+
organization_id: StrictInt,
|
|
398
|
+
custom_detector_id: StrictInt,
|
|
399
|
+
_request_timeout: Union[
|
|
400
|
+
None,
|
|
401
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
402
|
+
Tuple[
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
404
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
405
|
+
]
|
|
406
|
+
] = None,
|
|
407
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
408
|
+
_content_type: Optional[StrictStr] = None,
|
|
409
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
410
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
411
|
+
) -> ApiResponse[CustomDetector]:
|
|
412
|
+
"""Get Custom Detector
|
|
413
|
+
|
|
414
|
+
Returns custom detector attributes
|
|
415
|
+
|
|
416
|
+
:param organization_id: (required)
|
|
417
|
+
:type organization_id: int
|
|
418
|
+
:param custom_detector_id: (required)
|
|
419
|
+
:type custom_detector_id: int
|
|
420
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
421
|
+
number provided, it will be total request
|
|
422
|
+
timeout. It can also be a pair (tuple) of
|
|
423
|
+
(connection, read) timeouts.
|
|
424
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
425
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
426
|
+
request; this effectively ignores the
|
|
427
|
+
authentication in the spec for a single request.
|
|
428
|
+
:type _request_auth: dict, optional
|
|
429
|
+
:param _content_type: force content-type for the request.
|
|
430
|
+
:type _content_type: str, Optional
|
|
431
|
+
:param _headers: set to override the headers for a single
|
|
432
|
+
request; this effectively ignores the headers
|
|
433
|
+
in the spec for a single request.
|
|
434
|
+
:type _headers: dict, optional
|
|
435
|
+
:param _host_index: set to override the host_index for a single
|
|
436
|
+
request; this effectively ignores the host_index
|
|
437
|
+
in the spec for a single request.
|
|
438
|
+
:type _host_index: int, optional
|
|
439
|
+
:return: Returns the result object.
|
|
440
|
+
""" # noqa: E501
|
|
441
|
+
|
|
442
|
+
_param = self._get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get_serialize(
|
|
443
|
+
organization_id=organization_id,
|
|
444
|
+
custom_detector_id=custom_detector_id,
|
|
445
|
+
_request_auth=_request_auth,
|
|
446
|
+
_content_type=_content_type,
|
|
447
|
+
_headers=_headers,
|
|
448
|
+
_host_index=_host_index
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
452
|
+
'200': "CustomDetector",
|
|
453
|
+
'422': "HTTPValidationError",
|
|
454
|
+
}
|
|
455
|
+
response_data = await self.api_client.call_api(
|
|
456
|
+
*_param,
|
|
457
|
+
_request_timeout=_request_timeout
|
|
458
|
+
)
|
|
459
|
+
await response_data.read()
|
|
460
|
+
return self.api_client.response_deserialize(
|
|
461
|
+
response_data=response_data,
|
|
462
|
+
response_types_map=_response_types_map,
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@validate_call
|
|
467
|
+
async def get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get_without_preload_content(
|
|
468
|
+
self,
|
|
469
|
+
organization_id: StrictInt,
|
|
470
|
+
custom_detector_id: StrictInt,
|
|
471
|
+
_request_timeout: Union[
|
|
472
|
+
None,
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Tuple[
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
477
|
+
]
|
|
478
|
+
] = None,
|
|
479
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_content_type: Optional[StrictStr] = None,
|
|
481
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
483
|
+
) -> RESTResponseType:
|
|
484
|
+
"""Get Custom Detector
|
|
485
|
+
|
|
486
|
+
Returns custom detector attributes
|
|
487
|
+
|
|
488
|
+
:param organization_id: (required)
|
|
489
|
+
:type organization_id: int
|
|
490
|
+
:param custom_detector_id: (required)
|
|
491
|
+
:type custom_detector_id: int
|
|
492
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
493
|
+
number provided, it will be total request
|
|
494
|
+
timeout. It can also be a pair (tuple) of
|
|
495
|
+
(connection, read) timeouts.
|
|
496
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
497
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
498
|
+
request; this effectively ignores the
|
|
499
|
+
authentication in the spec for a single request.
|
|
500
|
+
:type _request_auth: dict, optional
|
|
501
|
+
:param _content_type: force content-type for the request.
|
|
502
|
+
:type _content_type: str, Optional
|
|
503
|
+
:param _headers: set to override the headers for a single
|
|
504
|
+
request; this effectively ignores the headers
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _headers: dict, optional
|
|
507
|
+
:param _host_index: set to override the host_index for a single
|
|
508
|
+
request; this effectively ignores the host_index
|
|
509
|
+
in the spec for a single request.
|
|
510
|
+
:type _host_index: int, optional
|
|
511
|
+
:return: Returns the result object.
|
|
512
|
+
""" # noqa: E501
|
|
513
|
+
|
|
514
|
+
_param = self._get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get_serialize(
|
|
515
|
+
organization_id=organization_id,
|
|
516
|
+
custom_detector_id=custom_detector_id,
|
|
517
|
+
_request_auth=_request_auth,
|
|
518
|
+
_content_type=_content_type,
|
|
519
|
+
_headers=_headers,
|
|
520
|
+
_host_index=_host_index
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
524
|
+
'200': "CustomDetector",
|
|
525
|
+
'422': "HTTPValidationError",
|
|
526
|
+
}
|
|
527
|
+
response_data = await self.api_client.call_api(
|
|
528
|
+
*_param,
|
|
529
|
+
_request_timeout=_request_timeout
|
|
530
|
+
)
|
|
531
|
+
return response_data.response
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
def _get_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_get_serialize(
|
|
535
|
+
self,
|
|
536
|
+
organization_id,
|
|
537
|
+
custom_detector_id,
|
|
538
|
+
_request_auth,
|
|
539
|
+
_content_type,
|
|
540
|
+
_headers,
|
|
541
|
+
_host_index,
|
|
542
|
+
) -> RequestSerialized:
|
|
543
|
+
|
|
544
|
+
_host = None
|
|
545
|
+
|
|
546
|
+
_collection_formats: Dict[str, str] = {
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
_path_params: Dict[str, str] = {}
|
|
550
|
+
_query_params: List[Tuple[str, str]] = []
|
|
551
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
552
|
+
_form_params: List[Tuple[str, str]] = []
|
|
553
|
+
_files: Dict[
|
|
554
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
555
|
+
] = {}
|
|
556
|
+
_body_params: Optional[bytes] = None
|
|
557
|
+
|
|
558
|
+
# process the path parameters
|
|
559
|
+
if organization_id is not None:
|
|
560
|
+
_path_params['organization_id'] = organization_id
|
|
561
|
+
if custom_detector_id is not None:
|
|
562
|
+
_path_params['custom_detector_id'] = custom_detector_id
|
|
563
|
+
# process the query parameters
|
|
564
|
+
# process the header parameters
|
|
565
|
+
# process the form parameters
|
|
566
|
+
# process the body parameter
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# set the HTTP header `Accept`
|
|
570
|
+
if 'Accept' not in _header_params:
|
|
571
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
572
|
+
[
|
|
573
|
+
'application/json'
|
|
574
|
+
]
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
# authentication setting
|
|
579
|
+
_auth_settings: List[str] = [
|
|
580
|
+
'OpenIdConnect'
|
|
581
|
+
]
|
|
582
|
+
|
|
583
|
+
return self.api_client.param_serialize(
|
|
584
|
+
method='GET',
|
|
585
|
+
resource_path='/organizations/{organization_id}/custom_detectors/{custom_detector_id}',
|
|
586
|
+
path_params=_path_params,
|
|
587
|
+
query_params=_query_params,
|
|
588
|
+
header_params=_header_params,
|
|
589
|
+
body=_body_params,
|
|
590
|
+
post_params=_form_params,
|
|
591
|
+
files=_files,
|
|
592
|
+
auth_settings=_auth_settings,
|
|
593
|
+
collection_formats=_collection_formats,
|
|
594
|
+
_host=_host,
|
|
595
|
+
_request_auth=_request_auth
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
@validate_call
|
|
602
|
+
async def get_custom_detectors_organizations_organization_id_custom_detectors_get(
|
|
603
|
+
self,
|
|
604
|
+
organization_id: StrictInt,
|
|
605
|
+
_request_timeout: Union[
|
|
606
|
+
None,
|
|
607
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
608
|
+
Tuple[
|
|
609
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
610
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
611
|
+
]
|
|
612
|
+
] = None,
|
|
613
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
614
|
+
_content_type: Optional[StrictStr] = None,
|
|
615
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
616
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
617
|
+
) -> List[CustomDetectorWithId]:
|
|
618
|
+
"""Get Custom Detectors
|
|
619
|
+
|
|
620
|
+
Returns all Custom Detectors of a organization
|
|
621
|
+
|
|
622
|
+
:param organization_id: (required)
|
|
623
|
+
:type organization_id: int
|
|
624
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
625
|
+
number provided, it will be total request
|
|
626
|
+
timeout. It can also be a pair (tuple) of
|
|
627
|
+
(connection, read) timeouts.
|
|
628
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
629
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
630
|
+
request; this effectively ignores the
|
|
631
|
+
authentication in the spec for a single request.
|
|
632
|
+
:type _request_auth: dict, optional
|
|
633
|
+
:param _content_type: force content-type for the request.
|
|
634
|
+
:type _content_type: str, Optional
|
|
635
|
+
:param _headers: set to override the headers for a single
|
|
636
|
+
request; this effectively ignores the headers
|
|
637
|
+
in the spec for a single request.
|
|
638
|
+
:type _headers: dict, optional
|
|
639
|
+
:param _host_index: set to override the host_index for a single
|
|
640
|
+
request; this effectively ignores the host_index
|
|
641
|
+
in the spec for a single request.
|
|
642
|
+
:type _host_index: int, optional
|
|
643
|
+
:return: Returns the result object.
|
|
644
|
+
""" # noqa: E501
|
|
645
|
+
|
|
646
|
+
_param = self._get_custom_detectors_organizations_organization_id_custom_detectors_get_serialize(
|
|
647
|
+
organization_id=organization_id,
|
|
648
|
+
_request_auth=_request_auth,
|
|
649
|
+
_content_type=_content_type,
|
|
650
|
+
_headers=_headers,
|
|
651
|
+
_host_index=_host_index
|
|
652
|
+
)
|
|
653
|
+
|
|
654
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
655
|
+
'200': "List[CustomDetectorWithId]",
|
|
656
|
+
'422': "HTTPValidationError",
|
|
657
|
+
}
|
|
658
|
+
response_data = await self.api_client.call_api(
|
|
659
|
+
*_param,
|
|
660
|
+
_request_timeout=_request_timeout
|
|
661
|
+
)
|
|
662
|
+
await response_data.read()
|
|
663
|
+
return self.api_client.response_deserialize(
|
|
664
|
+
response_data=response_data,
|
|
665
|
+
response_types_map=_response_types_map,
|
|
666
|
+
).data
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
@validate_call
|
|
670
|
+
async def get_custom_detectors_organizations_organization_id_custom_detectors_get_with_http_info(
|
|
671
|
+
self,
|
|
672
|
+
organization_id: StrictInt,
|
|
673
|
+
_request_timeout: Union[
|
|
674
|
+
None,
|
|
675
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
676
|
+
Tuple[
|
|
677
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
678
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
679
|
+
]
|
|
680
|
+
] = None,
|
|
681
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
682
|
+
_content_type: Optional[StrictStr] = None,
|
|
683
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
684
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
685
|
+
) -> ApiResponse[List[CustomDetectorWithId]]:
|
|
686
|
+
"""Get Custom Detectors
|
|
687
|
+
|
|
688
|
+
Returns all Custom Detectors of a organization
|
|
689
|
+
|
|
690
|
+
:param organization_id: (required)
|
|
691
|
+
:type organization_id: int
|
|
692
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
693
|
+
number provided, it will be total request
|
|
694
|
+
timeout. It can also be a pair (tuple) of
|
|
695
|
+
(connection, read) timeouts.
|
|
696
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
697
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
698
|
+
request; this effectively ignores the
|
|
699
|
+
authentication in the spec for a single request.
|
|
700
|
+
:type _request_auth: dict, optional
|
|
701
|
+
:param _content_type: force content-type for the request.
|
|
702
|
+
:type _content_type: str, Optional
|
|
703
|
+
:param _headers: set to override the headers for a single
|
|
704
|
+
request; this effectively ignores the headers
|
|
705
|
+
in the spec for a single request.
|
|
706
|
+
:type _headers: dict, optional
|
|
707
|
+
:param _host_index: set to override the host_index for a single
|
|
708
|
+
request; this effectively ignores the host_index
|
|
709
|
+
in the spec for a single request.
|
|
710
|
+
:type _host_index: int, optional
|
|
711
|
+
:return: Returns the result object.
|
|
712
|
+
""" # noqa: E501
|
|
713
|
+
|
|
714
|
+
_param = self._get_custom_detectors_organizations_organization_id_custom_detectors_get_serialize(
|
|
715
|
+
organization_id=organization_id,
|
|
716
|
+
_request_auth=_request_auth,
|
|
717
|
+
_content_type=_content_type,
|
|
718
|
+
_headers=_headers,
|
|
719
|
+
_host_index=_host_index
|
|
720
|
+
)
|
|
721
|
+
|
|
722
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
723
|
+
'200': "List[CustomDetectorWithId]",
|
|
724
|
+
'422': "HTTPValidationError",
|
|
725
|
+
}
|
|
726
|
+
response_data = await self.api_client.call_api(
|
|
727
|
+
*_param,
|
|
728
|
+
_request_timeout=_request_timeout
|
|
729
|
+
)
|
|
730
|
+
await response_data.read()
|
|
731
|
+
return self.api_client.response_deserialize(
|
|
732
|
+
response_data=response_data,
|
|
733
|
+
response_types_map=_response_types_map,
|
|
734
|
+
)
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
@validate_call
|
|
738
|
+
async def get_custom_detectors_organizations_organization_id_custom_detectors_get_without_preload_content(
|
|
739
|
+
self,
|
|
740
|
+
organization_id: StrictInt,
|
|
741
|
+
_request_timeout: Union[
|
|
742
|
+
None,
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
744
|
+
Tuple[
|
|
745
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
746
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
747
|
+
]
|
|
748
|
+
] = None,
|
|
749
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
750
|
+
_content_type: Optional[StrictStr] = None,
|
|
751
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
752
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
753
|
+
) -> RESTResponseType:
|
|
754
|
+
"""Get Custom Detectors
|
|
755
|
+
|
|
756
|
+
Returns all Custom Detectors of a organization
|
|
757
|
+
|
|
758
|
+
:param organization_id: (required)
|
|
759
|
+
:type organization_id: int
|
|
760
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
761
|
+
number provided, it will be total request
|
|
762
|
+
timeout. It can also be a pair (tuple) of
|
|
763
|
+
(connection, read) timeouts.
|
|
764
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
765
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
766
|
+
request; this effectively ignores the
|
|
767
|
+
authentication in the spec for a single request.
|
|
768
|
+
:type _request_auth: dict, optional
|
|
769
|
+
:param _content_type: force content-type for the request.
|
|
770
|
+
:type _content_type: str, Optional
|
|
771
|
+
:param _headers: set to override the headers for a single
|
|
772
|
+
request; this effectively ignores the headers
|
|
773
|
+
in the spec for a single request.
|
|
774
|
+
:type _headers: dict, optional
|
|
775
|
+
:param _host_index: set to override the host_index for a single
|
|
776
|
+
request; this effectively ignores the host_index
|
|
777
|
+
in the spec for a single request.
|
|
778
|
+
:type _host_index: int, optional
|
|
779
|
+
:return: Returns the result object.
|
|
780
|
+
""" # noqa: E501
|
|
781
|
+
|
|
782
|
+
_param = self._get_custom_detectors_organizations_organization_id_custom_detectors_get_serialize(
|
|
783
|
+
organization_id=organization_id,
|
|
784
|
+
_request_auth=_request_auth,
|
|
785
|
+
_content_type=_content_type,
|
|
786
|
+
_headers=_headers,
|
|
787
|
+
_host_index=_host_index
|
|
788
|
+
)
|
|
789
|
+
|
|
790
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
791
|
+
'200': "List[CustomDetectorWithId]",
|
|
792
|
+
'422': "HTTPValidationError",
|
|
793
|
+
}
|
|
794
|
+
response_data = await self.api_client.call_api(
|
|
795
|
+
*_param,
|
|
796
|
+
_request_timeout=_request_timeout
|
|
797
|
+
)
|
|
798
|
+
return response_data.response
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
def _get_custom_detectors_organizations_organization_id_custom_detectors_get_serialize(
|
|
802
|
+
self,
|
|
803
|
+
organization_id,
|
|
804
|
+
_request_auth,
|
|
805
|
+
_content_type,
|
|
806
|
+
_headers,
|
|
807
|
+
_host_index,
|
|
808
|
+
) -> RequestSerialized:
|
|
809
|
+
|
|
810
|
+
_host = None
|
|
811
|
+
|
|
812
|
+
_collection_formats: Dict[str, str] = {
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
_path_params: Dict[str, str] = {}
|
|
816
|
+
_query_params: List[Tuple[str, str]] = []
|
|
817
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
818
|
+
_form_params: List[Tuple[str, str]] = []
|
|
819
|
+
_files: Dict[
|
|
820
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
821
|
+
] = {}
|
|
822
|
+
_body_params: Optional[bytes] = None
|
|
823
|
+
|
|
824
|
+
# process the path parameters
|
|
825
|
+
if organization_id is not None:
|
|
826
|
+
_path_params['organization_id'] = organization_id
|
|
827
|
+
# process the query parameters
|
|
828
|
+
# process the header parameters
|
|
829
|
+
# process the form parameters
|
|
830
|
+
# process the body parameter
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
# set the HTTP header `Accept`
|
|
834
|
+
if 'Accept' not in _header_params:
|
|
835
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
836
|
+
[
|
|
837
|
+
'application/json'
|
|
838
|
+
]
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
# authentication setting
|
|
843
|
+
_auth_settings: List[str] = [
|
|
844
|
+
'OpenIdConnect'
|
|
845
|
+
]
|
|
846
|
+
|
|
847
|
+
return self.api_client.param_serialize(
|
|
848
|
+
method='GET',
|
|
849
|
+
resource_path='/organizations/{organization_id}/custom_detectors',
|
|
850
|
+
path_params=_path_params,
|
|
851
|
+
query_params=_query_params,
|
|
852
|
+
header_params=_header_params,
|
|
853
|
+
body=_body_params,
|
|
854
|
+
post_params=_form_params,
|
|
855
|
+
files=_files,
|
|
856
|
+
auth_settings=_auth_settings,
|
|
857
|
+
collection_formats=_collection_formats,
|
|
858
|
+
_host=_host,
|
|
859
|
+
_request_auth=_request_auth
|
|
860
|
+
)
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
@validate_call
|
|
866
|
+
async def post_custom_detector_organizations_organization_id_custom_detectors_post(
|
|
867
|
+
self,
|
|
868
|
+
organization_id: StrictInt,
|
|
869
|
+
custom_detector: CustomDetector,
|
|
870
|
+
_request_timeout: Union[
|
|
871
|
+
None,
|
|
872
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
873
|
+
Tuple[
|
|
874
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
875
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
876
|
+
]
|
|
877
|
+
] = None,
|
|
878
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
879
|
+
_content_type: Optional[StrictStr] = None,
|
|
880
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
881
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
882
|
+
) -> IdAndMessageResponse:
|
|
883
|
+
"""Post Custom Detector
|
|
884
|
+
|
|
885
|
+
Post custom detector
|
|
886
|
+
|
|
887
|
+
:param organization_id: (required)
|
|
888
|
+
:type organization_id: int
|
|
889
|
+
:param custom_detector: (required)
|
|
890
|
+
:type custom_detector: CustomDetector
|
|
891
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
892
|
+
number provided, it will be total request
|
|
893
|
+
timeout. It can also be a pair (tuple) of
|
|
894
|
+
(connection, read) timeouts.
|
|
895
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
896
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
897
|
+
request; this effectively ignores the
|
|
898
|
+
authentication in the spec for a single request.
|
|
899
|
+
:type _request_auth: dict, optional
|
|
900
|
+
:param _content_type: force content-type for the request.
|
|
901
|
+
:type _content_type: str, Optional
|
|
902
|
+
:param _headers: set to override the headers for a single
|
|
903
|
+
request; this effectively ignores the headers
|
|
904
|
+
in the spec for a single request.
|
|
905
|
+
:type _headers: dict, optional
|
|
906
|
+
:param _host_index: set to override the host_index for a single
|
|
907
|
+
request; this effectively ignores the host_index
|
|
908
|
+
in the spec for a single request.
|
|
909
|
+
:type _host_index: int, optional
|
|
910
|
+
:return: Returns the result object.
|
|
911
|
+
""" # noqa: E501
|
|
912
|
+
|
|
913
|
+
_param = self._post_custom_detector_organizations_organization_id_custom_detectors_post_serialize(
|
|
914
|
+
organization_id=organization_id,
|
|
915
|
+
custom_detector=custom_detector,
|
|
916
|
+
_request_auth=_request_auth,
|
|
917
|
+
_content_type=_content_type,
|
|
918
|
+
_headers=_headers,
|
|
919
|
+
_host_index=_host_index
|
|
920
|
+
)
|
|
921
|
+
|
|
922
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
923
|
+
'200': "IdAndMessageResponse",
|
|
924
|
+
'422': "HTTPValidationError",
|
|
925
|
+
}
|
|
926
|
+
response_data = await self.api_client.call_api(
|
|
927
|
+
*_param,
|
|
928
|
+
_request_timeout=_request_timeout
|
|
929
|
+
)
|
|
930
|
+
await response_data.read()
|
|
931
|
+
return self.api_client.response_deserialize(
|
|
932
|
+
response_data=response_data,
|
|
933
|
+
response_types_map=_response_types_map,
|
|
934
|
+
).data
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
@validate_call
|
|
938
|
+
async def post_custom_detector_organizations_organization_id_custom_detectors_post_with_http_info(
|
|
939
|
+
self,
|
|
940
|
+
organization_id: StrictInt,
|
|
941
|
+
custom_detector: CustomDetector,
|
|
942
|
+
_request_timeout: Union[
|
|
943
|
+
None,
|
|
944
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
945
|
+
Tuple[
|
|
946
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
948
|
+
]
|
|
949
|
+
] = None,
|
|
950
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
951
|
+
_content_type: Optional[StrictStr] = None,
|
|
952
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
953
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
954
|
+
) -> ApiResponse[IdAndMessageResponse]:
|
|
955
|
+
"""Post Custom Detector
|
|
956
|
+
|
|
957
|
+
Post custom detector
|
|
958
|
+
|
|
959
|
+
:param organization_id: (required)
|
|
960
|
+
:type organization_id: int
|
|
961
|
+
:param custom_detector: (required)
|
|
962
|
+
:type custom_detector: CustomDetector
|
|
963
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
964
|
+
number provided, it will be total request
|
|
965
|
+
timeout. It can also be a pair (tuple) of
|
|
966
|
+
(connection, read) timeouts.
|
|
967
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
968
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
969
|
+
request; this effectively ignores the
|
|
970
|
+
authentication in the spec for a single request.
|
|
971
|
+
:type _request_auth: dict, optional
|
|
972
|
+
:param _content_type: force content-type for the request.
|
|
973
|
+
:type _content_type: str, Optional
|
|
974
|
+
:param _headers: set to override the headers for a single
|
|
975
|
+
request; this effectively ignores the headers
|
|
976
|
+
in the spec for a single request.
|
|
977
|
+
:type _headers: dict, optional
|
|
978
|
+
:param _host_index: set to override the host_index for a single
|
|
979
|
+
request; this effectively ignores the host_index
|
|
980
|
+
in the spec for a single request.
|
|
981
|
+
:type _host_index: int, optional
|
|
982
|
+
:return: Returns the result object.
|
|
983
|
+
""" # noqa: E501
|
|
984
|
+
|
|
985
|
+
_param = self._post_custom_detector_organizations_organization_id_custom_detectors_post_serialize(
|
|
986
|
+
organization_id=organization_id,
|
|
987
|
+
custom_detector=custom_detector,
|
|
988
|
+
_request_auth=_request_auth,
|
|
989
|
+
_content_type=_content_type,
|
|
990
|
+
_headers=_headers,
|
|
991
|
+
_host_index=_host_index
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
995
|
+
'200': "IdAndMessageResponse",
|
|
996
|
+
'422': "HTTPValidationError",
|
|
997
|
+
}
|
|
998
|
+
response_data = await self.api_client.call_api(
|
|
999
|
+
*_param,
|
|
1000
|
+
_request_timeout=_request_timeout
|
|
1001
|
+
)
|
|
1002
|
+
await response_data.read()
|
|
1003
|
+
return self.api_client.response_deserialize(
|
|
1004
|
+
response_data=response_data,
|
|
1005
|
+
response_types_map=_response_types_map,
|
|
1006
|
+
)
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
@validate_call
|
|
1010
|
+
async def post_custom_detector_organizations_organization_id_custom_detectors_post_without_preload_content(
|
|
1011
|
+
self,
|
|
1012
|
+
organization_id: StrictInt,
|
|
1013
|
+
custom_detector: CustomDetector,
|
|
1014
|
+
_request_timeout: Union[
|
|
1015
|
+
None,
|
|
1016
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1017
|
+
Tuple[
|
|
1018
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1019
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1020
|
+
]
|
|
1021
|
+
] = None,
|
|
1022
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1023
|
+
_content_type: Optional[StrictStr] = None,
|
|
1024
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1025
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1026
|
+
) -> RESTResponseType:
|
|
1027
|
+
"""Post Custom Detector
|
|
1028
|
+
|
|
1029
|
+
Post custom detector
|
|
1030
|
+
|
|
1031
|
+
:param organization_id: (required)
|
|
1032
|
+
:type organization_id: int
|
|
1033
|
+
:param custom_detector: (required)
|
|
1034
|
+
:type custom_detector: CustomDetector
|
|
1035
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1036
|
+
number provided, it will be total request
|
|
1037
|
+
timeout. It can also be a pair (tuple) of
|
|
1038
|
+
(connection, read) timeouts.
|
|
1039
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1040
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1041
|
+
request; this effectively ignores the
|
|
1042
|
+
authentication in the spec for a single request.
|
|
1043
|
+
:type _request_auth: dict, optional
|
|
1044
|
+
:param _content_type: force content-type for the request.
|
|
1045
|
+
:type _content_type: str, Optional
|
|
1046
|
+
:param _headers: set to override the headers for a single
|
|
1047
|
+
request; this effectively ignores the headers
|
|
1048
|
+
in the spec for a single request.
|
|
1049
|
+
:type _headers: dict, optional
|
|
1050
|
+
:param _host_index: set to override the host_index for a single
|
|
1051
|
+
request; this effectively ignores the host_index
|
|
1052
|
+
in the spec for a single request.
|
|
1053
|
+
:type _host_index: int, optional
|
|
1054
|
+
:return: Returns the result object.
|
|
1055
|
+
""" # noqa: E501
|
|
1056
|
+
|
|
1057
|
+
_param = self._post_custom_detector_organizations_organization_id_custom_detectors_post_serialize(
|
|
1058
|
+
organization_id=organization_id,
|
|
1059
|
+
custom_detector=custom_detector,
|
|
1060
|
+
_request_auth=_request_auth,
|
|
1061
|
+
_content_type=_content_type,
|
|
1062
|
+
_headers=_headers,
|
|
1063
|
+
_host_index=_host_index
|
|
1064
|
+
)
|
|
1065
|
+
|
|
1066
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1067
|
+
'200': "IdAndMessageResponse",
|
|
1068
|
+
'422': "HTTPValidationError",
|
|
1069
|
+
}
|
|
1070
|
+
response_data = await self.api_client.call_api(
|
|
1071
|
+
*_param,
|
|
1072
|
+
_request_timeout=_request_timeout
|
|
1073
|
+
)
|
|
1074
|
+
return response_data.response
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
def _post_custom_detector_organizations_organization_id_custom_detectors_post_serialize(
|
|
1078
|
+
self,
|
|
1079
|
+
organization_id,
|
|
1080
|
+
custom_detector,
|
|
1081
|
+
_request_auth,
|
|
1082
|
+
_content_type,
|
|
1083
|
+
_headers,
|
|
1084
|
+
_host_index,
|
|
1085
|
+
) -> RequestSerialized:
|
|
1086
|
+
|
|
1087
|
+
_host = None
|
|
1088
|
+
|
|
1089
|
+
_collection_formats: Dict[str, str] = {
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
_path_params: Dict[str, str] = {}
|
|
1093
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1094
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1095
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1096
|
+
_files: Dict[
|
|
1097
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1098
|
+
] = {}
|
|
1099
|
+
_body_params: Optional[bytes] = None
|
|
1100
|
+
|
|
1101
|
+
# process the path parameters
|
|
1102
|
+
if organization_id is not None:
|
|
1103
|
+
_path_params['organization_id'] = organization_id
|
|
1104
|
+
# process the query parameters
|
|
1105
|
+
# process the header parameters
|
|
1106
|
+
# process the form parameters
|
|
1107
|
+
# process the body parameter
|
|
1108
|
+
if custom_detector is not None:
|
|
1109
|
+
_body_params = custom_detector
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
# set the HTTP header `Accept`
|
|
1113
|
+
if 'Accept' not in _header_params:
|
|
1114
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1115
|
+
[
|
|
1116
|
+
'application/json'
|
|
1117
|
+
]
|
|
1118
|
+
)
|
|
1119
|
+
|
|
1120
|
+
# set the HTTP header `Content-Type`
|
|
1121
|
+
if _content_type:
|
|
1122
|
+
_header_params['Content-Type'] = _content_type
|
|
1123
|
+
else:
|
|
1124
|
+
_default_content_type = (
|
|
1125
|
+
self.api_client.select_header_content_type(
|
|
1126
|
+
[
|
|
1127
|
+
'application/json'
|
|
1128
|
+
]
|
|
1129
|
+
)
|
|
1130
|
+
)
|
|
1131
|
+
if _default_content_type is not None:
|
|
1132
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1133
|
+
|
|
1134
|
+
# authentication setting
|
|
1135
|
+
_auth_settings: List[str] = [
|
|
1136
|
+
'OpenIdConnect'
|
|
1137
|
+
]
|
|
1138
|
+
|
|
1139
|
+
return self.api_client.param_serialize(
|
|
1140
|
+
method='POST',
|
|
1141
|
+
resource_path='/organizations/{organization_id}/custom_detectors',
|
|
1142
|
+
path_params=_path_params,
|
|
1143
|
+
query_params=_query_params,
|
|
1144
|
+
header_params=_header_params,
|
|
1145
|
+
body=_body_params,
|
|
1146
|
+
post_params=_form_params,
|
|
1147
|
+
files=_files,
|
|
1148
|
+
auth_settings=_auth_settings,
|
|
1149
|
+
collection_formats=_collection_formats,
|
|
1150
|
+
_host=_host,
|
|
1151
|
+
_request_auth=_request_auth
|
|
1152
|
+
)
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
@validate_call
|
|
1158
|
+
async def put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put(
|
|
1159
|
+
self,
|
|
1160
|
+
organization_id: StrictInt,
|
|
1161
|
+
custom_detector_id: StrictInt,
|
|
1162
|
+
custom_detector: CustomDetector,
|
|
1163
|
+
_request_timeout: Union[
|
|
1164
|
+
None,
|
|
1165
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1166
|
+
Tuple[
|
|
1167
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1169
|
+
]
|
|
1170
|
+
] = None,
|
|
1171
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1172
|
+
_content_type: Optional[StrictStr] = None,
|
|
1173
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1174
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1175
|
+
) -> SuccessAndMessageResponse:
|
|
1176
|
+
"""Put Custom Detector
|
|
1177
|
+
|
|
1178
|
+
Update custom detector attributes
|
|
1179
|
+
|
|
1180
|
+
:param organization_id: (required)
|
|
1181
|
+
:type organization_id: int
|
|
1182
|
+
:param custom_detector_id: (required)
|
|
1183
|
+
:type custom_detector_id: int
|
|
1184
|
+
:param custom_detector: (required)
|
|
1185
|
+
:type custom_detector: CustomDetector
|
|
1186
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1187
|
+
number provided, it will be total request
|
|
1188
|
+
timeout. It can also be a pair (tuple) of
|
|
1189
|
+
(connection, read) timeouts.
|
|
1190
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1191
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1192
|
+
request; this effectively ignores the
|
|
1193
|
+
authentication in the spec for a single request.
|
|
1194
|
+
:type _request_auth: dict, optional
|
|
1195
|
+
:param _content_type: force content-type for the request.
|
|
1196
|
+
:type _content_type: str, Optional
|
|
1197
|
+
:param _headers: set to override the headers for a single
|
|
1198
|
+
request; this effectively ignores the headers
|
|
1199
|
+
in the spec for a single request.
|
|
1200
|
+
:type _headers: dict, optional
|
|
1201
|
+
:param _host_index: set to override the host_index for a single
|
|
1202
|
+
request; this effectively ignores the host_index
|
|
1203
|
+
in the spec for a single request.
|
|
1204
|
+
:type _host_index: int, optional
|
|
1205
|
+
:return: Returns the result object.
|
|
1206
|
+
""" # noqa: E501
|
|
1207
|
+
|
|
1208
|
+
_param = self._put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put_serialize(
|
|
1209
|
+
organization_id=organization_id,
|
|
1210
|
+
custom_detector_id=custom_detector_id,
|
|
1211
|
+
custom_detector=custom_detector,
|
|
1212
|
+
_request_auth=_request_auth,
|
|
1213
|
+
_content_type=_content_type,
|
|
1214
|
+
_headers=_headers,
|
|
1215
|
+
_host_index=_host_index
|
|
1216
|
+
)
|
|
1217
|
+
|
|
1218
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1219
|
+
'200': "SuccessAndMessageResponse",
|
|
1220
|
+
'422': "HTTPValidationError",
|
|
1221
|
+
}
|
|
1222
|
+
response_data = await self.api_client.call_api(
|
|
1223
|
+
*_param,
|
|
1224
|
+
_request_timeout=_request_timeout
|
|
1225
|
+
)
|
|
1226
|
+
await response_data.read()
|
|
1227
|
+
return self.api_client.response_deserialize(
|
|
1228
|
+
response_data=response_data,
|
|
1229
|
+
response_types_map=_response_types_map,
|
|
1230
|
+
).data
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
@validate_call
|
|
1234
|
+
async def put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put_with_http_info(
|
|
1235
|
+
self,
|
|
1236
|
+
organization_id: StrictInt,
|
|
1237
|
+
custom_detector_id: StrictInt,
|
|
1238
|
+
custom_detector: CustomDetector,
|
|
1239
|
+
_request_timeout: Union[
|
|
1240
|
+
None,
|
|
1241
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1242
|
+
Tuple[
|
|
1243
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1244
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1245
|
+
]
|
|
1246
|
+
] = None,
|
|
1247
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1248
|
+
_content_type: Optional[StrictStr] = None,
|
|
1249
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1250
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1251
|
+
) -> ApiResponse[SuccessAndMessageResponse]:
|
|
1252
|
+
"""Put Custom Detector
|
|
1253
|
+
|
|
1254
|
+
Update custom detector attributes
|
|
1255
|
+
|
|
1256
|
+
:param organization_id: (required)
|
|
1257
|
+
:type organization_id: int
|
|
1258
|
+
:param custom_detector_id: (required)
|
|
1259
|
+
:type custom_detector_id: int
|
|
1260
|
+
:param custom_detector: (required)
|
|
1261
|
+
:type custom_detector: CustomDetector
|
|
1262
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1263
|
+
number provided, it will be total request
|
|
1264
|
+
timeout. It can also be a pair (tuple) of
|
|
1265
|
+
(connection, read) timeouts.
|
|
1266
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1267
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1268
|
+
request; this effectively ignores the
|
|
1269
|
+
authentication in the spec for a single request.
|
|
1270
|
+
:type _request_auth: dict, optional
|
|
1271
|
+
:param _content_type: force content-type for the request.
|
|
1272
|
+
:type _content_type: str, Optional
|
|
1273
|
+
:param _headers: set to override the headers for a single
|
|
1274
|
+
request; this effectively ignores the headers
|
|
1275
|
+
in the spec for a single request.
|
|
1276
|
+
:type _headers: dict, optional
|
|
1277
|
+
:param _host_index: set to override the host_index for a single
|
|
1278
|
+
request; this effectively ignores the host_index
|
|
1279
|
+
in the spec for a single request.
|
|
1280
|
+
:type _host_index: int, optional
|
|
1281
|
+
:return: Returns the result object.
|
|
1282
|
+
""" # noqa: E501
|
|
1283
|
+
|
|
1284
|
+
_param = self._put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put_serialize(
|
|
1285
|
+
organization_id=organization_id,
|
|
1286
|
+
custom_detector_id=custom_detector_id,
|
|
1287
|
+
custom_detector=custom_detector,
|
|
1288
|
+
_request_auth=_request_auth,
|
|
1289
|
+
_content_type=_content_type,
|
|
1290
|
+
_headers=_headers,
|
|
1291
|
+
_host_index=_host_index
|
|
1292
|
+
)
|
|
1293
|
+
|
|
1294
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1295
|
+
'200': "SuccessAndMessageResponse",
|
|
1296
|
+
'422': "HTTPValidationError",
|
|
1297
|
+
}
|
|
1298
|
+
response_data = await self.api_client.call_api(
|
|
1299
|
+
*_param,
|
|
1300
|
+
_request_timeout=_request_timeout
|
|
1301
|
+
)
|
|
1302
|
+
await response_data.read()
|
|
1303
|
+
return self.api_client.response_deserialize(
|
|
1304
|
+
response_data=response_data,
|
|
1305
|
+
response_types_map=_response_types_map,
|
|
1306
|
+
)
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
@validate_call
|
|
1310
|
+
async def put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put_without_preload_content(
|
|
1311
|
+
self,
|
|
1312
|
+
organization_id: StrictInt,
|
|
1313
|
+
custom_detector_id: StrictInt,
|
|
1314
|
+
custom_detector: CustomDetector,
|
|
1315
|
+
_request_timeout: Union[
|
|
1316
|
+
None,
|
|
1317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1318
|
+
Tuple[
|
|
1319
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1320
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1321
|
+
]
|
|
1322
|
+
] = None,
|
|
1323
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1324
|
+
_content_type: Optional[StrictStr] = None,
|
|
1325
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1326
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1327
|
+
) -> RESTResponseType:
|
|
1328
|
+
"""Put Custom Detector
|
|
1329
|
+
|
|
1330
|
+
Update custom detector attributes
|
|
1331
|
+
|
|
1332
|
+
:param organization_id: (required)
|
|
1333
|
+
:type organization_id: int
|
|
1334
|
+
:param custom_detector_id: (required)
|
|
1335
|
+
:type custom_detector_id: int
|
|
1336
|
+
:param custom_detector: (required)
|
|
1337
|
+
:type custom_detector: CustomDetector
|
|
1338
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1339
|
+
number provided, it will be total request
|
|
1340
|
+
timeout. It can also be a pair (tuple) of
|
|
1341
|
+
(connection, read) timeouts.
|
|
1342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1344
|
+
request; this effectively ignores the
|
|
1345
|
+
authentication in the spec for a single request.
|
|
1346
|
+
:type _request_auth: dict, optional
|
|
1347
|
+
:param _content_type: force content-type for the request.
|
|
1348
|
+
:type _content_type: str, Optional
|
|
1349
|
+
:param _headers: set to override the headers for a single
|
|
1350
|
+
request; this effectively ignores the headers
|
|
1351
|
+
in the spec for a single request.
|
|
1352
|
+
:type _headers: dict, optional
|
|
1353
|
+
:param _host_index: set to override the host_index for a single
|
|
1354
|
+
request; this effectively ignores the host_index
|
|
1355
|
+
in the spec for a single request.
|
|
1356
|
+
:type _host_index: int, optional
|
|
1357
|
+
:return: Returns the result object.
|
|
1358
|
+
""" # noqa: E501
|
|
1359
|
+
|
|
1360
|
+
_param = self._put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put_serialize(
|
|
1361
|
+
organization_id=organization_id,
|
|
1362
|
+
custom_detector_id=custom_detector_id,
|
|
1363
|
+
custom_detector=custom_detector,
|
|
1364
|
+
_request_auth=_request_auth,
|
|
1365
|
+
_content_type=_content_type,
|
|
1366
|
+
_headers=_headers,
|
|
1367
|
+
_host_index=_host_index
|
|
1368
|
+
)
|
|
1369
|
+
|
|
1370
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1371
|
+
'200': "SuccessAndMessageResponse",
|
|
1372
|
+
'422': "HTTPValidationError",
|
|
1373
|
+
}
|
|
1374
|
+
response_data = await self.api_client.call_api(
|
|
1375
|
+
*_param,
|
|
1376
|
+
_request_timeout=_request_timeout
|
|
1377
|
+
)
|
|
1378
|
+
return response_data.response
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
def _put_custom_detector_organizations_organization_id_custom_detectors_custom_detector_id_put_serialize(
|
|
1382
|
+
self,
|
|
1383
|
+
organization_id,
|
|
1384
|
+
custom_detector_id,
|
|
1385
|
+
custom_detector,
|
|
1386
|
+
_request_auth,
|
|
1387
|
+
_content_type,
|
|
1388
|
+
_headers,
|
|
1389
|
+
_host_index,
|
|
1390
|
+
) -> RequestSerialized:
|
|
1391
|
+
|
|
1392
|
+
_host = None
|
|
1393
|
+
|
|
1394
|
+
_collection_formats: Dict[str, str] = {
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
_path_params: Dict[str, str] = {}
|
|
1398
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1399
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1400
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1401
|
+
_files: Dict[
|
|
1402
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1403
|
+
] = {}
|
|
1404
|
+
_body_params: Optional[bytes] = None
|
|
1405
|
+
|
|
1406
|
+
# process the path parameters
|
|
1407
|
+
if organization_id is not None:
|
|
1408
|
+
_path_params['organization_id'] = organization_id
|
|
1409
|
+
if custom_detector_id is not None:
|
|
1410
|
+
_path_params['custom_detector_id'] = custom_detector_id
|
|
1411
|
+
# process the query parameters
|
|
1412
|
+
# process the header parameters
|
|
1413
|
+
# process the form parameters
|
|
1414
|
+
# process the body parameter
|
|
1415
|
+
if custom_detector is not None:
|
|
1416
|
+
_body_params = custom_detector
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
# set the HTTP header `Accept`
|
|
1420
|
+
if 'Accept' not in _header_params:
|
|
1421
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1422
|
+
[
|
|
1423
|
+
'application/json'
|
|
1424
|
+
]
|
|
1425
|
+
)
|
|
1426
|
+
|
|
1427
|
+
# set the HTTP header `Content-Type`
|
|
1428
|
+
if _content_type:
|
|
1429
|
+
_header_params['Content-Type'] = _content_type
|
|
1430
|
+
else:
|
|
1431
|
+
_default_content_type = (
|
|
1432
|
+
self.api_client.select_header_content_type(
|
|
1433
|
+
[
|
|
1434
|
+
'application/json'
|
|
1435
|
+
]
|
|
1436
|
+
)
|
|
1437
|
+
)
|
|
1438
|
+
if _default_content_type is not None:
|
|
1439
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1440
|
+
|
|
1441
|
+
# authentication setting
|
|
1442
|
+
_auth_settings: List[str] = [
|
|
1443
|
+
'OpenIdConnect'
|
|
1444
|
+
]
|
|
1445
|
+
|
|
1446
|
+
return self.api_client.param_serialize(
|
|
1447
|
+
method='PUT',
|
|
1448
|
+
resource_path='/organizations/{organization_id}/custom_detectors/{custom_detector_id}',
|
|
1449
|
+
path_params=_path_params,
|
|
1450
|
+
query_params=_query_params,
|
|
1451
|
+
header_params=_header_params,
|
|
1452
|
+
body=_body_params,
|
|
1453
|
+
post_params=_form_params,
|
|
1454
|
+
files=_files,
|
|
1455
|
+
auth_settings=_auth_settings,
|
|
1456
|
+
collection_formats=_collection_formats,
|
|
1457
|
+
_host=_host,
|
|
1458
|
+
_request_auth=_request_auth
|
|
1459
|
+
)
|
|
1460
|
+
|
|
1461
|
+
|