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,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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from audithub_sdk.models.project_info_output import ProjectInfoOutput
|
|
23
|
+
from audithub_sdk.models.version_data import VersionData
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ProjectData(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ProjectData
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
definition: ProjectInfoOutput
|
|
32
|
+
version: VersionData
|
|
33
|
+
__properties: ClassVar[List[str]] = ["definition", "version"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ProjectData from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of definition
|
|
75
|
+
if self.definition:
|
|
76
|
+
_dict['definition'] = self.definition.to_dict()
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
|
78
|
+
if self.version:
|
|
79
|
+
_dict['version'] = self.version.to_dict()
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of ProjectData from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"definition": ProjectInfoOutput.from_dict(obj["definition"]) if obj.get("definition") is not None else None,
|
|
93
|
+
"version": VersionData.from_dict(obj["version"]) if obj.get("version") is not None else None
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from audithub_sdk.models.npm_project_dependency import NPMProjectDependency
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ProjectDependency(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ProjectDependency
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
npm: Optional[NPMProjectDependency] = None
|
|
31
|
+
foundry: Optional[StrictBool] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["npm", "foundry"]
|
|
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 ProjectDependency 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
|
+
# override the default output from pydantic by calling `to_dict()` of npm
|
|
74
|
+
if self.npm:
|
|
75
|
+
_dict['npm'] = self.npm.to_dict()
|
|
76
|
+
# set to None if npm (nullable) is None
|
|
77
|
+
# and model_fields_set contains the field
|
|
78
|
+
if self.npm is None and "npm" in self.model_fields_set:
|
|
79
|
+
_dict['npm'] = None
|
|
80
|
+
|
|
81
|
+
# set to None if foundry (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.foundry is None and "foundry" in self.model_fields_set:
|
|
84
|
+
_dict['foundry'] = None
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of ProjectDependency from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"npm": NPMProjectDependency.from_dict(obj["npm"]) if obj.get("npm") is not None else None,
|
|
99
|
+
"foundry": obj.get("foundry")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -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 ProjectGitHubLink(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ProjectGitHubLink
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
gh_repo: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["gh_repo"]
|
|
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 ProjectGitHubLink 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 ProjectGitHubLink 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
|
+
"gh_repo": obj.get("gh_repo")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,186 @@
|
|
|
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, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from audithub_sdk.models.env_var import EnvVar
|
|
23
|
+
from audithub_sdk.models.input_info import InputInfo
|
|
24
|
+
from audithub_sdk.models.project_dependency import ProjectDependency
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class ProjectInfoInput(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
ProjectInfoInput
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
name: StrictStr
|
|
33
|
+
project_root: StrictStr = Field(description="Relative path inside archive")
|
|
34
|
+
env_vars: Optional[List[EnvVar]] = None
|
|
35
|
+
dependencies: Optional[ProjectDependency] = None
|
|
36
|
+
build_system: Optional[StrictStr] = None
|
|
37
|
+
contents: Optional[List[StrictStr]] = None
|
|
38
|
+
src_path: StrictStr = Field(description="The path where we can find the sources to process. This is relative path inside archive, and it must be bellow project_root.")
|
|
39
|
+
include_path: Optional[StrictStr] = None
|
|
40
|
+
specs_path: Optional[StrictStr] = None
|
|
41
|
+
hints_path: Optional[StrictStr] = None
|
|
42
|
+
deployment_script_path: Optional[StrictStr] = None
|
|
43
|
+
input_info: InputInfo
|
|
44
|
+
__properties: ClassVar[List[str]] = ["name", "project_root", "env_vars", "dependencies", "build_system", "contents", "src_path", "include_path", "specs_path", "hints_path", "deployment_script_path", "input_info"]
|
|
45
|
+
|
|
46
|
+
@field_validator('build_system')
|
|
47
|
+
def build_system_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if value not in set(['hardhat', 'hardhat-ignition', 'foundry']):
|
|
53
|
+
raise ValueError("must be one of enum values ('hardhat', 'hardhat-ignition', 'foundry')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
@field_validator('contents')
|
|
57
|
+
def contents_validate_enum(cls, value):
|
|
58
|
+
"""Validates the enum"""
|
|
59
|
+
if value is None:
|
|
60
|
+
return value
|
|
61
|
+
|
|
62
|
+
for i in value:
|
|
63
|
+
if i not in set(['circom', 'solidity', 'picus', 'llzk']):
|
|
64
|
+
raise ValueError("each list item must be one of ('circom', 'solidity', 'picus', 'llzk')")
|
|
65
|
+
return value
|
|
66
|
+
|
|
67
|
+
model_config = ConfigDict(
|
|
68
|
+
populate_by_name=True,
|
|
69
|
+
validate_assignment=True,
|
|
70
|
+
protected_namespaces=(),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def to_str(self) -> str:
|
|
75
|
+
"""Returns the string representation of the model using alias"""
|
|
76
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
77
|
+
|
|
78
|
+
def to_json(self) -> str:
|
|
79
|
+
"""Returns the JSON representation of the model using alias"""
|
|
80
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
81
|
+
return json.dumps(self.to_dict())
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of ProjectInfoInput from a JSON string"""
|
|
86
|
+
return cls.from_dict(json.loads(json_str))
|
|
87
|
+
|
|
88
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
89
|
+
"""Return the dictionary representation of the model using alias.
|
|
90
|
+
|
|
91
|
+
This has the following differences from calling pydantic's
|
|
92
|
+
`self.model_dump(by_alias=True)`:
|
|
93
|
+
|
|
94
|
+
* `None` is only added to the output dict for nullable fields that
|
|
95
|
+
were set at model initialization. Other fields with value `None`
|
|
96
|
+
are ignored.
|
|
97
|
+
"""
|
|
98
|
+
excluded_fields: Set[str] = set([
|
|
99
|
+
])
|
|
100
|
+
|
|
101
|
+
_dict = self.model_dump(
|
|
102
|
+
by_alias=True,
|
|
103
|
+
exclude=excluded_fields,
|
|
104
|
+
exclude_none=True,
|
|
105
|
+
)
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of each item in env_vars (list)
|
|
107
|
+
_items = []
|
|
108
|
+
if self.env_vars:
|
|
109
|
+
for _item_env_vars in self.env_vars:
|
|
110
|
+
if _item_env_vars:
|
|
111
|
+
_items.append(_item_env_vars.to_dict())
|
|
112
|
+
_dict['env_vars'] = _items
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of dependencies
|
|
114
|
+
if self.dependencies:
|
|
115
|
+
_dict['dependencies'] = self.dependencies.to_dict()
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of input_info
|
|
117
|
+
if self.input_info:
|
|
118
|
+
_dict['input_info'] = self.input_info.to_dict()
|
|
119
|
+
# set to None if env_vars (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.env_vars is None and "env_vars" in self.model_fields_set:
|
|
122
|
+
_dict['env_vars'] = None
|
|
123
|
+
|
|
124
|
+
# set to None if dependencies (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.dependencies is None and "dependencies" in self.model_fields_set:
|
|
127
|
+
_dict['dependencies'] = None
|
|
128
|
+
|
|
129
|
+
# set to None if build_system (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.build_system is None and "build_system" in self.model_fields_set:
|
|
132
|
+
_dict['build_system'] = None
|
|
133
|
+
|
|
134
|
+
# set to None if contents (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.contents is None and "contents" in self.model_fields_set:
|
|
137
|
+
_dict['contents'] = None
|
|
138
|
+
|
|
139
|
+
# set to None if include_path (nullable) is None
|
|
140
|
+
# and model_fields_set contains the field
|
|
141
|
+
if self.include_path is None and "include_path" in self.model_fields_set:
|
|
142
|
+
_dict['include_path'] = None
|
|
143
|
+
|
|
144
|
+
# set to None if specs_path (nullable) is None
|
|
145
|
+
# and model_fields_set contains the field
|
|
146
|
+
if self.specs_path is None and "specs_path" in self.model_fields_set:
|
|
147
|
+
_dict['specs_path'] = None
|
|
148
|
+
|
|
149
|
+
# set to None if hints_path (nullable) is None
|
|
150
|
+
# and model_fields_set contains the field
|
|
151
|
+
if self.hints_path is None and "hints_path" in self.model_fields_set:
|
|
152
|
+
_dict['hints_path'] = None
|
|
153
|
+
|
|
154
|
+
# set to None if deployment_script_path (nullable) is None
|
|
155
|
+
# and model_fields_set contains the field
|
|
156
|
+
if self.deployment_script_path is None and "deployment_script_path" in self.model_fields_set:
|
|
157
|
+
_dict['deployment_script_path'] = None
|
|
158
|
+
|
|
159
|
+
return _dict
|
|
160
|
+
|
|
161
|
+
@classmethod
|
|
162
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
163
|
+
"""Create an instance of ProjectInfoInput from a dict"""
|
|
164
|
+
if obj is None:
|
|
165
|
+
return None
|
|
166
|
+
|
|
167
|
+
if not isinstance(obj, dict):
|
|
168
|
+
return cls.model_validate(obj)
|
|
169
|
+
|
|
170
|
+
_obj = cls.model_validate({
|
|
171
|
+
"name": obj.get("name"),
|
|
172
|
+
"project_root": obj.get("project_root"),
|
|
173
|
+
"env_vars": [EnvVar.from_dict(_item) for _item in obj["env_vars"]] if obj.get("env_vars") is not None else None,
|
|
174
|
+
"dependencies": ProjectDependency.from_dict(obj["dependencies"]) if obj.get("dependencies") is not None else None,
|
|
175
|
+
"build_system": obj.get("build_system"),
|
|
176
|
+
"contents": obj.get("contents"),
|
|
177
|
+
"src_path": obj.get("src_path"),
|
|
178
|
+
"include_path": obj.get("include_path"),
|
|
179
|
+
"specs_path": obj.get("specs_path"),
|
|
180
|
+
"hints_path": obj.get("hints_path"),
|
|
181
|
+
"deployment_script_path": obj.get("deployment_script_path"),
|
|
182
|
+
"input_info": InputInfo.from_dict(obj["input_info"]) if obj.get("input_info") is not None else None
|
|
183
|
+
})
|
|
184
|
+
return _obj
|
|
185
|
+
|
|
186
|
+
|
|
@@ -0,0 +1,186 @@
|
|
|
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, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from audithub_sdk.models.env_var import EnvVar
|
|
23
|
+
from audithub_sdk.models.input_info import InputInfo
|
|
24
|
+
from audithub_sdk.models.project_dependency import ProjectDependency
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class ProjectInfoOutput(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
ProjectInfoOutput
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
name: StrictStr
|
|
33
|
+
project_root: StrictStr = Field(description="Relative path inside archive")
|
|
34
|
+
env_vars: Optional[List[EnvVar]] = None
|
|
35
|
+
dependencies: Optional[ProjectDependency] = None
|
|
36
|
+
build_system: Optional[StrictStr] = None
|
|
37
|
+
contents: Optional[List[StrictStr]] = None
|
|
38
|
+
src_path: StrictStr = Field(description="The path where we can find the sources to process. This is relative path inside archive, and it must be bellow project_root.")
|
|
39
|
+
include_path: Optional[StrictStr] = None
|
|
40
|
+
specs_path: Optional[StrictStr] = None
|
|
41
|
+
hints_path: Optional[StrictStr] = None
|
|
42
|
+
deployment_script_path: Optional[StrictStr] = None
|
|
43
|
+
input_info: InputInfo
|
|
44
|
+
__properties: ClassVar[List[str]] = ["name", "project_root", "env_vars", "dependencies", "build_system", "contents", "src_path", "include_path", "specs_path", "hints_path", "deployment_script_path", "input_info"]
|
|
45
|
+
|
|
46
|
+
@field_validator('build_system')
|
|
47
|
+
def build_system_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if value not in set(['hardhat', 'hardhat-ignition', 'foundry']):
|
|
53
|
+
raise ValueError("must be one of enum values ('hardhat', 'hardhat-ignition', 'foundry')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
@field_validator('contents')
|
|
57
|
+
def contents_validate_enum(cls, value):
|
|
58
|
+
"""Validates the enum"""
|
|
59
|
+
if value is None:
|
|
60
|
+
return value
|
|
61
|
+
|
|
62
|
+
for i in value:
|
|
63
|
+
if i not in set(['circom', 'solidity', 'picus', 'llzk']):
|
|
64
|
+
raise ValueError("each list item must be one of ('circom', 'solidity', 'picus', 'llzk')")
|
|
65
|
+
return value
|
|
66
|
+
|
|
67
|
+
model_config = ConfigDict(
|
|
68
|
+
populate_by_name=True,
|
|
69
|
+
validate_assignment=True,
|
|
70
|
+
protected_namespaces=(),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def to_str(self) -> str:
|
|
75
|
+
"""Returns the string representation of the model using alias"""
|
|
76
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
77
|
+
|
|
78
|
+
def to_json(self) -> str:
|
|
79
|
+
"""Returns the JSON representation of the model using alias"""
|
|
80
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
81
|
+
return json.dumps(self.to_dict())
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of ProjectInfoOutput from a JSON string"""
|
|
86
|
+
return cls.from_dict(json.loads(json_str))
|
|
87
|
+
|
|
88
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
89
|
+
"""Return the dictionary representation of the model using alias.
|
|
90
|
+
|
|
91
|
+
This has the following differences from calling pydantic's
|
|
92
|
+
`self.model_dump(by_alias=True)`:
|
|
93
|
+
|
|
94
|
+
* `None` is only added to the output dict for nullable fields that
|
|
95
|
+
were set at model initialization. Other fields with value `None`
|
|
96
|
+
are ignored.
|
|
97
|
+
"""
|
|
98
|
+
excluded_fields: Set[str] = set([
|
|
99
|
+
])
|
|
100
|
+
|
|
101
|
+
_dict = self.model_dump(
|
|
102
|
+
by_alias=True,
|
|
103
|
+
exclude=excluded_fields,
|
|
104
|
+
exclude_none=True,
|
|
105
|
+
)
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of each item in env_vars (list)
|
|
107
|
+
_items = []
|
|
108
|
+
if self.env_vars:
|
|
109
|
+
for _item_env_vars in self.env_vars:
|
|
110
|
+
if _item_env_vars:
|
|
111
|
+
_items.append(_item_env_vars.to_dict())
|
|
112
|
+
_dict['env_vars'] = _items
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of dependencies
|
|
114
|
+
if self.dependencies:
|
|
115
|
+
_dict['dependencies'] = self.dependencies.to_dict()
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of input_info
|
|
117
|
+
if self.input_info:
|
|
118
|
+
_dict['input_info'] = self.input_info.to_dict()
|
|
119
|
+
# set to None if env_vars (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.env_vars is None and "env_vars" in self.model_fields_set:
|
|
122
|
+
_dict['env_vars'] = None
|
|
123
|
+
|
|
124
|
+
# set to None if dependencies (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.dependencies is None and "dependencies" in self.model_fields_set:
|
|
127
|
+
_dict['dependencies'] = None
|
|
128
|
+
|
|
129
|
+
# set to None if build_system (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.build_system is None and "build_system" in self.model_fields_set:
|
|
132
|
+
_dict['build_system'] = None
|
|
133
|
+
|
|
134
|
+
# set to None if contents (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.contents is None and "contents" in self.model_fields_set:
|
|
137
|
+
_dict['contents'] = None
|
|
138
|
+
|
|
139
|
+
# set to None if include_path (nullable) is None
|
|
140
|
+
# and model_fields_set contains the field
|
|
141
|
+
if self.include_path is None and "include_path" in self.model_fields_set:
|
|
142
|
+
_dict['include_path'] = None
|
|
143
|
+
|
|
144
|
+
# set to None if specs_path (nullable) is None
|
|
145
|
+
# and model_fields_set contains the field
|
|
146
|
+
if self.specs_path is None and "specs_path" in self.model_fields_set:
|
|
147
|
+
_dict['specs_path'] = None
|
|
148
|
+
|
|
149
|
+
# set to None if hints_path (nullable) is None
|
|
150
|
+
# and model_fields_set contains the field
|
|
151
|
+
if self.hints_path is None and "hints_path" in self.model_fields_set:
|
|
152
|
+
_dict['hints_path'] = None
|
|
153
|
+
|
|
154
|
+
# set to None if deployment_script_path (nullable) is None
|
|
155
|
+
# and model_fields_set contains the field
|
|
156
|
+
if self.deployment_script_path is None and "deployment_script_path" in self.model_fields_set:
|
|
157
|
+
_dict['deployment_script_path'] = None
|
|
158
|
+
|
|
159
|
+
return _dict
|
|
160
|
+
|
|
161
|
+
@classmethod
|
|
162
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
163
|
+
"""Create an instance of ProjectInfoOutput from a dict"""
|
|
164
|
+
if obj is None:
|
|
165
|
+
return None
|
|
166
|
+
|
|
167
|
+
if not isinstance(obj, dict):
|
|
168
|
+
return cls.model_validate(obj)
|
|
169
|
+
|
|
170
|
+
_obj = cls.model_validate({
|
|
171
|
+
"name": obj.get("name"),
|
|
172
|
+
"project_root": obj.get("project_root"),
|
|
173
|
+
"env_vars": [EnvVar.from_dict(_item) for _item in obj["env_vars"]] if obj.get("env_vars") is not None else None,
|
|
174
|
+
"dependencies": ProjectDependency.from_dict(obj["dependencies"]) if obj.get("dependencies") is not None else None,
|
|
175
|
+
"build_system": obj.get("build_system"),
|
|
176
|
+
"contents": obj.get("contents"),
|
|
177
|
+
"src_path": obj.get("src_path"),
|
|
178
|
+
"include_path": obj.get("include_path"),
|
|
179
|
+
"specs_path": obj.get("specs_path"),
|
|
180
|
+
"hints_path": obj.get("hints_path"),
|
|
181
|
+
"deployment_script_path": obj.get("deployment_script_path"),
|
|
182
|
+
"input_info": InputInfo.from_dict(obj["input_info"]) if obj.get("input_info") is not None else None
|
|
183
|
+
})
|
|
184
|
+
return _obj
|
|
185
|
+
|
|
186
|
+
|