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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RegisteredUser(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RegisteredUser
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: StrictStr
|
|
31
|
+
created_at: datetime
|
|
32
|
+
created_by: StrictStr
|
|
33
|
+
ignored_for_quota: Optional[StrictBool] = False
|
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "created_at", "created_by", "ignored_for_quota"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of RegisteredUser from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of RegisteredUser from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"id": obj.get("id"),
|
|
88
|
+
"created_at": obj.get("created_at"),
|
|
89
|
+
"created_by": obj.get("created_by"),
|
|
90
|
+
"ignored_for_quota": obj.get("ignored_for_quota") if obj.get("ignored_for_quota") is not None else False
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
93
|
+
|
|
94
|
+
|
|
@@ -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 ResourcePatch(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ResourcePatch
|
|
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(['delete']):
|
|
36
|
+
raise ValueError("must be one of enum values ('delete')")
|
|
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 ResourcePatch 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 ResourcePatch 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,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, StrictFloat, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class Resources(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Resources
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
cpu_minutes: Union[StrictFloat, StrictInt]
|
|
30
|
+
__properties: ClassVar[List[str]] = ["cpu_minutes"]
|
|
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 Resources 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 Resources 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
|
+
"cpu_minutes": obj.get("cpu_minutes")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
from inspect import getfullargspec
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from audithub_sdk.models.custom_detector_from_organization_library import CustomDetectorFromOrganizationLibrary
|
|
23
|
+
from audithub_sdk.models.custom_detector_from_standard_library import CustomDetectorFromStandardLibrary
|
|
24
|
+
from audithub_sdk.models.custom_detector_from_version import CustomDetectorFromVersion
|
|
25
|
+
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
26
|
+
from typing_extensions import Literal, Self
|
|
27
|
+
from pydantic import Field
|
|
28
|
+
|
|
29
|
+
ROOTMODELLISTUNIONCUSTOMDETECTORFROMVERSIONCUSTOMDETECTORFROMSTANDARDLIBRARYCUSTOMDETECTORFROMORGANIZATIONLIBRARYINNER_ANY_OF_SCHEMAS = ["CustomDetectorFromOrganizationLibrary", "CustomDetectorFromStandardLibrary", "CustomDetectorFromVersion"]
|
|
30
|
+
|
|
31
|
+
class RootModelListUnionCustomDetectorFromVersionCustomDetectorFromStandardLibraryCustomDetectorFromOrganizationLibraryInner(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
RootModelListUnionCustomDetectorFromVersionCustomDetectorFromStandardLibraryCustomDetectorFromOrganizationLibraryInner
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
# data type: CustomDetectorFromVersion
|
|
37
|
+
anyof_schema_1_validator: Optional[CustomDetectorFromVersion] = None
|
|
38
|
+
# data type: CustomDetectorFromStandardLibrary
|
|
39
|
+
anyof_schema_2_validator: Optional[CustomDetectorFromStandardLibrary] = None
|
|
40
|
+
# data type: CustomDetectorFromOrganizationLibrary
|
|
41
|
+
anyof_schema_3_validator: Optional[CustomDetectorFromOrganizationLibrary] = None
|
|
42
|
+
if TYPE_CHECKING:
|
|
43
|
+
actual_instance: Optional[Union[CustomDetectorFromOrganizationLibrary, CustomDetectorFromStandardLibrary, CustomDetectorFromVersion]] = None
|
|
44
|
+
else:
|
|
45
|
+
actual_instance: Any = None
|
|
46
|
+
any_of_schemas: Set[str] = { "CustomDetectorFromOrganizationLibrary", "CustomDetectorFromStandardLibrary", "CustomDetectorFromVersion" }
|
|
47
|
+
|
|
48
|
+
model_config = {
|
|
49
|
+
"validate_assignment": True,
|
|
50
|
+
"protected_namespaces": (),
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
54
|
+
if args:
|
|
55
|
+
if len(args) > 1:
|
|
56
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
57
|
+
if kwargs:
|
|
58
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
59
|
+
super().__init__(actual_instance=args[0])
|
|
60
|
+
else:
|
|
61
|
+
super().__init__(**kwargs)
|
|
62
|
+
|
|
63
|
+
@field_validator('actual_instance')
|
|
64
|
+
def actual_instance_must_validate_anyof(cls, v):
|
|
65
|
+
instance = RootModelListUnionCustomDetectorFromVersionCustomDetectorFromStandardLibraryCustomDetectorFromOrganizationLibraryInner.model_construct()
|
|
66
|
+
error_messages = []
|
|
67
|
+
# validate data type: CustomDetectorFromVersion
|
|
68
|
+
if not isinstance(v, CustomDetectorFromVersion):
|
|
69
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CustomDetectorFromVersion`")
|
|
70
|
+
else:
|
|
71
|
+
return v
|
|
72
|
+
|
|
73
|
+
# validate data type: CustomDetectorFromStandardLibrary
|
|
74
|
+
if not isinstance(v, CustomDetectorFromStandardLibrary):
|
|
75
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CustomDetectorFromStandardLibrary`")
|
|
76
|
+
else:
|
|
77
|
+
return v
|
|
78
|
+
|
|
79
|
+
# validate data type: CustomDetectorFromOrganizationLibrary
|
|
80
|
+
if not isinstance(v, CustomDetectorFromOrganizationLibrary):
|
|
81
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CustomDetectorFromOrganizationLibrary`")
|
|
82
|
+
else:
|
|
83
|
+
return v
|
|
84
|
+
|
|
85
|
+
if error_messages:
|
|
86
|
+
# no match
|
|
87
|
+
raise ValueError("No match found when setting the actual_instance in RootModelListUnionCustomDetectorFromVersionCustomDetectorFromStandardLibraryCustomDetectorFromOrganizationLibraryInner with anyOf schemas: CustomDetectorFromOrganizationLibrary, CustomDetectorFromStandardLibrary, CustomDetectorFromVersion. Details: " + ", ".join(error_messages))
|
|
88
|
+
else:
|
|
89
|
+
return v
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
|
93
|
+
return cls.from_json(json.dumps(obj))
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_json(cls, json_str: str) -> Self:
|
|
97
|
+
"""Returns the object represented by the json string"""
|
|
98
|
+
instance = cls.model_construct()
|
|
99
|
+
error_messages = []
|
|
100
|
+
# anyof_schema_1_validator: Optional[CustomDetectorFromVersion] = None
|
|
101
|
+
try:
|
|
102
|
+
instance.actual_instance = CustomDetectorFromVersion.from_json(json_str)
|
|
103
|
+
return instance
|
|
104
|
+
except (ValidationError, ValueError) as e:
|
|
105
|
+
error_messages.append(str(e))
|
|
106
|
+
# anyof_schema_2_validator: Optional[CustomDetectorFromStandardLibrary] = None
|
|
107
|
+
try:
|
|
108
|
+
instance.actual_instance = CustomDetectorFromStandardLibrary.from_json(json_str)
|
|
109
|
+
return instance
|
|
110
|
+
except (ValidationError, ValueError) as e:
|
|
111
|
+
error_messages.append(str(e))
|
|
112
|
+
# anyof_schema_3_validator: Optional[CustomDetectorFromOrganizationLibrary] = None
|
|
113
|
+
try:
|
|
114
|
+
instance.actual_instance = CustomDetectorFromOrganizationLibrary.from_json(json_str)
|
|
115
|
+
return instance
|
|
116
|
+
except (ValidationError, ValueError) as e:
|
|
117
|
+
error_messages.append(str(e))
|
|
118
|
+
|
|
119
|
+
if error_messages:
|
|
120
|
+
# no match
|
|
121
|
+
raise ValueError("No match found when deserializing the JSON string into RootModelListUnionCustomDetectorFromVersionCustomDetectorFromStandardLibraryCustomDetectorFromOrganizationLibraryInner with anyOf schemas: CustomDetectorFromOrganizationLibrary, CustomDetectorFromStandardLibrary, CustomDetectorFromVersion. Details: " + ", ".join(error_messages))
|
|
122
|
+
else:
|
|
123
|
+
return instance
|
|
124
|
+
|
|
125
|
+
def to_json(self) -> str:
|
|
126
|
+
"""Returns the JSON representation of the actual instance"""
|
|
127
|
+
if self.actual_instance is None:
|
|
128
|
+
return "null"
|
|
129
|
+
|
|
130
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
131
|
+
return self.actual_instance.to_json()
|
|
132
|
+
else:
|
|
133
|
+
return json.dumps(self.actual_instance)
|
|
134
|
+
|
|
135
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], CustomDetectorFromOrganizationLibrary, CustomDetectorFromStandardLibrary, CustomDetectorFromVersion]]:
|
|
136
|
+
"""Returns the dict representation of the actual instance"""
|
|
137
|
+
if self.actual_instance is None:
|
|
138
|
+
return None
|
|
139
|
+
|
|
140
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
141
|
+
return self.actual_instance.to_dict()
|
|
142
|
+
else:
|
|
143
|
+
return self.actual_instance
|
|
144
|
+
|
|
145
|
+
def to_str(self) -> str:
|
|
146
|
+
"""Returns the string representation of the actual instance"""
|
|
147
|
+
return pprint.pformat(self.model_dump())
|
|
148
|
+
|
|
149
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
from inspect import getfullargspec
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from audithub_sdk.models.hint_ad_hoc import HintAdHoc
|
|
23
|
+
from audithub_sdk.models.hint_from_organization_library import HintFromOrganizationLibrary
|
|
24
|
+
from audithub_sdk.models.hint_from_standard_library import HintFromStandardLibrary
|
|
25
|
+
from audithub_sdk.models.hint_from_version import HintFromVersion
|
|
26
|
+
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
27
|
+
from typing_extensions import Literal, Self
|
|
28
|
+
from pydantic import Field
|
|
29
|
+
|
|
30
|
+
ROOTMODELLISTUNIONHINTFROMVERSIONHINTFROMSTANDARDLIBRARYHINTFROMORGANIZATIONLIBRARYHINTADHOCINNER_ANY_OF_SCHEMAS = ["HintAdHoc", "HintFromOrganizationLibrary", "HintFromStandardLibrary", "HintFromVersion"]
|
|
31
|
+
|
|
32
|
+
class RootModelListUnionHintFromVersionHintFromStandardLibraryHintFromOrganizationLibraryHintAdHocInner(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
RootModelListUnionHintFromVersionHintFromStandardLibraryHintFromOrganizationLibraryHintAdHocInner
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
# data type: HintFromVersion
|
|
38
|
+
anyof_schema_1_validator: Optional[HintFromVersion] = None
|
|
39
|
+
# data type: HintFromStandardLibrary
|
|
40
|
+
anyof_schema_2_validator: Optional[HintFromStandardLibrary] = None
|
|
41
|
+
# data type: HintFromOrganizationLibrary
|
|
42
|
+
anyof_schema_3_validator: Optional[HintFromOrganizationLibrary] = None
|
|
43
|
+
# data type: HintAdHoc
|
|
44
|
+
anyof_schema_4_validator: Optional[HintAdHoc] = None
|
|
45
|
+
if TYPE_CHECKING:
|
|
46
|
+
actual_instance: Optional[Union[HintAdHoc, HintFromOrganizationLibrary, HintFromStandardLibrary, HintFromVersion]] = None
|
|
47
|
+
else:
|
|
48
|
+
actual_instance: Any = None
|
|
49
|
+
any_of_schemas: Set[str] = { "HintAdHoc", "HintFromOrganizationLibrary", "HintFromStandardLibrary", "HintFromVersion" }
|
|
50
|
+
|
|
51
|
+
model_config = {
|
|
52
|
+
"validate_assignment": True,
|
|
53
|
+
"protected_namespaces": (),
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
57
|
+
if args:
|
|
58
|
+
if len(args) > 1:
|
|
59
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
60
|
+
if kwargs:
|
|
61
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
62
|
+
super().__init__(actual_instance=args[0])
|
|
63
|
+
else:
|
|
64
|
+
super().__init__(**kwargs)
|
|
65
|
+
|
|
66
|
+
@field_validator('actual_instance')
|
|
67
|
+
def actual_instance_must_validate_anyof(cls, v):
|
|
68
|
+
instance = RootModelListUnionHintFromVersionHintFromStandardLibraryHintFromOrganizationLibraryHintAdHocInner.model_construct()
|
|
69
|
+
error_messages = []
|
|
70
|
+
# validate data type: HintFromVersion
|
|
71
|
+
if not isinstance(v, HintFromVersion):
|
|
72
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `HintFromVersion`")
|
|
73
|
+
else:
|
|
74
|
+
return v
|
|
75
|
+
|
|
76
|
+
# validate data type: HintFromStandardLibrary
|
|
77
|
+
if not isinstance(v, HintFromStandardLibrary):
|
|
78
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `HintFromStandardLibrary`")
|
|
79
|
+
else:
|
|
80
|
+
return v
|
|
81
|
+
|
|
82
|
+
# validate data type: HintFromOrganizationLibrary
|
|
83
|
+
if not isinstance(v, HintFromOrganizationLibrary):
|
|
84
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `HintFromOrganizationLibrary`")
|
|
85
|
+
else:
|
|
86
|
+
return v
|
|
87
|
+
|
|
88
|
+
# validate data type: HintAdHoc
|
|
89
|
+
if not isinstance(v, HintAdHoc):
|
|
90
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `HintAdHoc`")
|
|
91
|
+
else:
|
|
92
|
+
return v
|
|
93
|
+
|
|
94
|
+
if error_messages:
|
|
95
|
+
# no match
|
|
96
|
+
raise ValueError("No match found when setting the actual_instance in RootModelListUnionHintFromVersionHintFromStandardLibraryHintFromOrganizationLibraryHintAdHocInner with anyOf schemas: HintAdHoc, HintFromOrganizationLibrary, HintFromStandardLibrary, HintFromVersion. Details: " + ", ".join(error_messages))
|
|
97
|
+
else:
|
|
98
|
+
return v
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
|
102
|
+
return cls.from_json(json.dumps(obj))
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_json(cls, json_str: str) -> Self:
|
|
106
|
+
"""Returns the object represented by the json string"""
|
|
107
|
+
instance = cls.model_construct()
|
|
108
|
+
error_messages = []
|
|
109
|
+
# anyof_schema_1_validator: Optional[HintFromVersion] = None
|
|
110
|
+
try:
|
|
111
|
+
instance.actual_instance = HintFromVersion.from_json(json_str)
|
|
112
|
+
return instance
|
|
113
|
+
except (ValidationError, ValueError) as e:
|
|
114
|
+
error_messages.append(str(e))
|
|
115
|
+
# anyof_schema_2_validator: Optional[HintFromStandardLibrary] = None
|
|
116
|
+
try:
|
|
117
|
+
instance.actual_instance = HintFromStandardLibrary.from_json(json_str)
|
|
118
|
+
return instance
|
|
119
|
+
except (ValidationError, ValueError) as e:
|
|
120
|
+
error_messages.append(str(e))
|
|
121
|
+
# anyof_schema_3_validator: Optional[HintFromOrganizationLibrary] = None
|
|
122
|
+
try:
|
|
123
|
+
instance.actual_instance = HintFromOrganizationLibrary.from_json(json_str)
|
|
124
|
+
return instance
|
|
125
|
+
except (ValidationError, ValueError) as e:
|
|
126
|
+
error_messages.append(str(e))
|
|
127
|
+
# anyof_schema_4_validator: Optional[HintAdHoc] = None
|
|
128
|
+
try:
|
|
129
|
+
instance.actual_instance = HintAdHoc.from_json(json_str)
|
|
130
|
+
return instance
|
|
131
|
+
except (ValidationError, ValueError) as e:
|
|
132
|
+
error_messages.append(str(e))
|
|
133
|
+
|
|
134
|
+
if error_messages:
|
|
135
|
+
# no match
|
|
136
|
+
raise ValueError("No match found when deserializing the JSON string into RootModelListUnionHintFromVersionHintFromStandardLibraryHintFromOrganizationLibraryHintAdHocInner with anyOf schemas: HintAdHoc, HintFromOrganizationLibrary, HintFromStandardLibrary, HintFromVersion. Details: " + ", ".join(error_messages))
|
|
137
|
+
else:
|
|
138
|
+
return instance
|
|
139
|
+
|
|
140
|
+
def to_json(self) -> str:
|
|
141
|
+
"""Returns the JSON representation of the actual instance"""
|
|
142
|
+
if self.actual_instance is None:
|
|
143
|
+
return "null"
|
|
144
|
+
|
|
145
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
146
|
+
return self.actual_instance.to_json()
|
|
147
|
+
else:
|
|
148
|
+
return json.dumps(self.actual_instance)
|
|
149
|
+
|
|
150
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], HintAdHoc, HintFromOrganizationLibrary, HintFromStandardLibrary, HintFromVersion]]:
|
|
151
|
+
"""Returns the dict representation of the actual instance"""
|
|
152
|
+
if self.actual_instance is None:
|
|
153
|
+
return None
|
|
154
|
+
|
|
155
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
156
|
+
return self.actual_instance.to_dict()
|
|
157
|
+
else:
|
|
158
|
+
return self.actual_instance
|
|
159
|
+
|
|
160
|
+
def to_str(self) -> str:
|
|
161
|
+
"""Returns the string representation of the actual instance"""
|
|
162
|
+
return pprint.pformat(self.model_dump())
|
|
163
|
+
|
|
164
|
+
|