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,94 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AdminResourcePatch(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AdminResourcePatch
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["action"]
|
|
31
|
+
|
|
32
|
+
@field_validator('action')
|
|
33
|
+
def action_validate_enum(cls, value):
|
|
34
|
+
"""Validates the enum"""
|
|
35
|
+
if value not in set(['restore']):
|
|
36
|
+
raise ValueError("must be one of enum values ('restore')")
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of AdminResourcePatch from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of AdminResourcePatch from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"action": obj.get("action")
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class APIBlacklistedHint(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
APIBlacklistedHint
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
source: StrictStr
|
|
30
|
+
reference: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["source", "reference"]
|
|
32
|
+
|
|
33
|
+
@field_validator('source')
|
|
34
|
+
def source_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value not in set(['stdlib', 'orglib', 'version']):
|
|
37
|
+
raise ValueError("must be one of enum values ('stdlib', 'orglib', 'version')")
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
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 json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of APIBlacklistedHint 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 APIBlacklistedHint 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
|
+
"source": obj.get("source"),
|
|
92
|
+
"reference": obj.get("reference")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ApiKey(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ApiKey
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: StrictStr
|
|
30
|
+
client_id: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["name", "client_id"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ApiKey from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of ApiKey from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"name": obj.get("name"),
|
|
85
|
+
"client_id": obj.get("client_id")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ApiKeyBase(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ApiKeyBase
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["name"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of ApiKeyBase from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of ApiKeyBase from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"name": obj.get("name")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ApiKeyWithSecret(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ApiKeyWithSecret
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: StrictStr
|
|
30
|
+
client_id: StrictStr
|
|
31
|
+
client_secret: StrictStr
|
|
32
|
+
__properties: ClassVar[List[str]] = ["name", "client_id", "client_secret"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ApiKeyWithSecret from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of ApiKeyWithSecret from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"name": obj.get("name"),
|
|
86
|
+
"client_id": obj.get("client_id"),
|
|
87
|
+
"client_secret": obj.get("client_secret")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ApplicationFunction(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ApplicationFunction
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: StrictStr
|
|
30
|
+
caption: StrictStr
|
|
31
|
+
has_value: StrictBool
|
|
32
|
+
applicability: StrictInt
|
|
33
|
+
per_project: StrictBool
|
|
34
|
+
per_detector: StrictBool
|
|
35
|
+
__properties: ClassVar[List[str]] = ["name", "caption", "has_value", "applicability", "per_project", "per_detector"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ApplicationFunction from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of ApplicationFunction from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"name": obj.get("name"),
|
|
89
|
+
"caption": obj.get("caption"),
|
|
90
|
+
"has_value": obj.get("has_value"),
|
|
91
|
+
"applicability": obj.get("applicability"),
|
|
92
|
+
"per_project": obj.get("per_project"),
|
|
93
|
+
"per_detector": obj.get("per_detector")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FastAPI
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ArchiveInput(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ArchiveInput
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
input_type: Optional[StrictStr] = 'archive'
|
|
30
|
+
url: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["input_type", "url"]
|
|
32
|
+
|
|
33
|
+
@field_validator('input_type')
|
|
34
|
+
def input_type_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value is None:
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
if value not in set(['archive']):
|
|
40
|
+
raise ValueError("must be one of enum values ('archive')")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of ArchiveInput from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# set to None if url (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.url is None and "url" in self.model_fields_set:
|
|
85
|
+
_dict['url'] = None
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of ArchiveInput from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"input_type": obj.get("input_type") if obj.get("input_type") is not None else 'archive',
|
|
100
|
+
"url": obj.get("url")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
103
|
+
|
|
104
|
+
|