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,101 @@
|
|
|
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 typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class VSpec(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
VSpec
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
filename: StrictStr = Field(description="The filename for this V Spec.")
|
|
30
|
+
contents: StrictStr = Field(description="The contents of this file")
|
|
31
|
+
encoding: Optional[StrictStr] = Field(default='plain', description="The encoding of the contents. Currently, only 'plain' is supported, which simply places the value of the contents JSON key to the file")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["filename", "contents", "encoding"]
|
|
33
|
+
|
|
34
|
+
@field_validator('encoding')
|
|
35
|
+
def encoding_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if value not in set(['plain']):
|
|
41
|
+
raise ValueError("must be one of enum values ('plain')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of VSpec from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of VSpec from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"filename": obj.get("filename"),
|
|
96
|
+
"contents": obj.get("contents"),
|
|
97
|
+
"encoding": obj.get("encoding") if obj.get("encoding") is not None else 'plain'
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
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 typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class VSpecAdHoc(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
VSpecAdHoc
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
type: Optional[StrictStr] = 'adhoc'
|
|
30
|
+
filename: StrictStr = Field(description="The filename for this V Spec.")
|
|
31
|
+
contents: StrictStr = Field(description="The contents of this file")
|
|
32
|
+
encoding: Optional[StrictStr] = Field(default='plain', description="The encoding of the contents. Currently, only 'plain' is supported, which simply places the value of the contents JSON key to the file")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["type", "filename", "contents", "encoding"]
|
|
34
|
+
|
|
35
|
+
@field_validator('type')
|
|
36
|
+
def type_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value is None:
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
if value not in set(['adhoc']):
|
|
42
|
+
raise ValueError("must be one of enum values ('adhoc')")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
@field_validator('encoding')
|
|
46
|
+
def encoding_validate_enum(cls, value):
|
|
47
|
+
"""Validates the enum"""
|
|
48
|
+
if value is None:
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
if value not in set(['plain']):
|
|
52
|
+
raise ValueError("must be one of enum values ('plain')")
|
|
53
|
+
return value
|
|
54
|
+
|
|
55
|
+
model_config = ConfigDict(
|
|
56
|
+
populate_by_name=True,
|
|
57
|
+
validate_assignment=True,
|
|
58
|
+
protected_namespaces=(),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def to_str(self) -> str:
|
|
63
|
+
"""Returns the string representation of the model using alias"""
|
|
64
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
65
|
+
|
|
66
|
+
def to_json(self) -> str:
|
|
67
|
+
"""Returns the JSON representation of the model using alias"""
|
|
68
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
69
|
+
return json.dumps(self.to_dict())
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
73
|
+
"""Create an instance of VSpecAdHoc from a JSON string"""
|
|
74
|
+
return cls.from_dict(json.loads(json_str))
|
|
75
|
+
|
|
76
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
77
|
+
"""Return the dictionary representation of the model using alias.
|
|
78
|
+
|
|
79
|
+
This has the following differences from calling pydantic's
|
|
80
|
+
`self.model_dump(by_alias=True)`:
|
|
81
|
+
|
|
82
|
+
* `None` is only added to the output dict for nullable fields that
|
|
83
|
+
were set at model initialization. Other fields with value `None`
|
|
84
|
+
are ignored.
|
|
85
|
+
"""
|
|
86
|
+
excluded_fields: Set[str] = set([
|
|
87
|
+
])
|
|
88
|
+
|
|
89
|
+
_dict = self.model_dump(
|
|
90
|
+
by_alias=True,
|
|
91
|
+
exclude=excluded_fields,
|
|
92
|
+
exclude_none=True,
|
|
93
|
+
)
|
|
94
|
+
return _dict
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
+
"""Create an instance of VSpecAdHoc from a dict"""
|
|
99
|
+
if obj is None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
if not isinstance(obj, dict):
|
|
103
|
+
return cls.model_validate(obj)
|
|
104
|
+
|
|
105
|
+
_obj = cls.model_validate({
|
|
106
|
+
"type": obj.get("type") if obj.get("type") is not None else 'adhoc',
|
|
107
|
+
"filename": obj.get("filename"),
|
|
108
|
+
"contents": obj.get("contents"),
|
|
109
|
+
"encoding": obj.get("encoding") if obj.get("encoding") is not None else 'plain'
|
|
110
|
+
})
|
|
111
|
+
return _obj
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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, StrictInt, 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 VSpecFromOrganizationLibrary(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
VSpecFromOrganizationLibrary
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
type: Optional[StrictStr] = 'orglib'
|
|
30
|
+
id: StrictInt = Field(description="The id of the V specification from the organization's library.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["type", "id"]
|
|
32
|
+
|
|
33
|
+
@field_validator('type')
|
|
34
|
+
def type_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value is None:
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
if value not in set(['orglib']):
|
|
40
|
+
raise ValueError("must be one of enum values ('orglib')")
|
|
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 VSpecFromOrganizationLibrary 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
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of VSpecFromOrganizationLibrary from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"type": obj.get("type") if obj.get("type") is not None else 'orglib',
|
|
95
|
+
"id": obj.get("id")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
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 VSpecFromStandardLibrary(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
VSpecFromStandardLibrary
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
type: Optional[StrictStr] = 'stdlib'
|
|
30
|
+
library_version: Optional[StrictStr] = None
|
|
31
|
+
category: StrictStr
|
|
32
|
+
name: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["type", "library_version", "category", "name"]
|
|
34
|
+
|
|
35
|
+
@field_validator('type')
|
|
36
|
+
def type_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value is None:
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
if value not in set(['stdlib']):
|
|
42
|
+
raise ValueError("must be one of enum values ('stdlib')")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of VSpecFromStandardLibrary from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# set to None if library_version (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.library_version is None and "library_version" in self.model_fields_set:
|
|
87
|
+
_dict['library_version'] = None
|
|
88
|
+
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of VSpecFromStandardLibrary from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"type": obj.get("type") if obj.get("type") is not None else 'stdlib',
|
|
102
|
+
"library_version": obj.get("library_version"),
|
|
103
|
+
"category": obj.get("category"),
|
|
104
|
+
"name": obj.get("name")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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 typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class VSpecFromVersion(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
VSpecFromVersion
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
type: Optional[StrictStr] = 'version'
|
|
30
|
+
relative_path: StrictStr = Field(description="Relative path from the version archive's root")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["type", "relative_path"]
|
|
32
|
+
|
|
33
|
+
@field_validator('type')
|
|
34
|
+
def type_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value is None:
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
if value not in set(['version']):
|
|
40
|
+
raise ValueError("must be one of enum values ('version')")
|
|
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 VSpecFromVersion 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
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of VSpecFromVersion from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"type": obj.get("type") if obj.get("type") is not None else 'version',
|
|
95
|
+
"relative_path": obj.get("relative_path")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -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, Field, StrictInt, 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 VSpecWithId(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
VSpecWithId
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
filename: StrictStr = Field(description="The filename for this V Spec.")
|
|
30
|
+
contents: StrictStr = Field(description="The contents of this file")
|
|
31
|
+
encoding: Optional[StrictStr] = Field(default='plain', description="The encoding of the contents. Currently, only 'plain' is supported, which simply places the value of the contents JSON key to the file")
|
|
32
|
+
id: StrictInt = Field(description="The id of this V specification")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["filename", "contents", "encoding", "id"]
|
|
34
|
+
|
|
35
|
+
@field_validator('encoding')
|
|
36
|
+
def encoding_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value is None:
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
if value not in set(['plain']):
|
|
42
|
+
raise ValueError("must be one of enum values ('plain')")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of VSpecWithId from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of VSpecWithId from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"filename": obj.get("filename"),
|
|
97
|
+
"contents": obj.get("contents"),
|
|
98
|
+
"encoding": obj.get("encoding") if obj.get("encoding") is not None else 'plain',
|
|
99
|
+
"id": obj.get("id")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|