hiddenlayer-sdk 2.0.9__py3-none-any.whl → 3.0.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.
- hiddenlayer/__init__.py +109 -105
- hiddenlayer/_base_client.py +1995 -0
- hiddenlayer/_client.py +761 -0
- hiddenlayer/_compat.py +219 -0
- hiddenlayer/_constants.py +14 -0
- hiddenlayer/_exceptions.py +108 -0
- hiddenlayer/_files.py +123 -0
- hiddenlayer/_models.py +835 -0
- hiddenlayer/_oauth2.py +118 -0
- hiddenlayer/_qs.py +150 -0
- hiddenlayer/_resource.py +43 -0
- hiddenlayer/_response.py +832 -0
- hiddenlayer/_streaming.py +333 -0
- hiddenlayer/_types.py +260 -0
- hiddenlayer/_utils/__init__.py +64 -0
- hiddenlayer/_utils/_compat.py +45 -0
- hiddenlayer/_utils/_datetime_parse.py +136 -0
- hiddenlayer/_utils/_logs.py +25 -0
- hiddenlayer/_utils/_proxy.py +65 -0
- hiddenlayer/_utils/_reflection.py +42 -0
- hiddenlayer/_utils/_resources_proxy.py +24 -0
- hiddenlayer/_utils/_streams.py +12 -0
- hiddenlayer/_utils/_sync.py +86 -0
- hiddenlayer/_utils/_transform.py +457 -0
- hiddenlayer/_utils/_typing.py +156 -0
- hiddenlayer/_utils/_utils.py +421 -0
- hiddenlayer/_version.py +4 -0
- hiddenlayer/lib/.keep +4 -0
- hiddenlayer/lib/__init__.py +6 -0
- hiddenlayer/lib/community_scan.py +174 -0
- hiddenlayer/lib/model_scan.py +752 -0
- hiddenlayer/lib/scan_utils.py +142 -0
- hiddenlayer/pagination.py +127 -0
- hiddenlayer/resources/__init__.py +75 -0
- hiddenlayer/resources/interactions.py +205 -0
- hiddenlayer/resources/models/__init__.py +33 -0
- hiddenlayer/resources/models/cards.py +259 -0
- hiddenlayer/resources/models/models.py +284 -0
- hiddenlayer/resources/prompt_analyzer.py +207 -0
- hiddenlayer/resources/scans/__init__.py +61 -0
- hiddenlayer/resources/scans/jobs.py +499 -0
- hiddenlayer/resources/scans/results.py +169 -0
- hiddenlayer/resources/scans/scans.py +166 -0
- hiddenlayer/resources/scans/upload/__init__.py +33 -0
- hiddenlayer/resources/scans/upload/file.py +279 -0
- hiddenlayer/resources/scans/upload/upload.py +340 -0
- hiddenlayer/resources/sensors.py +575 -0
- hiddenlayer/types/__init__.py +16 -0
- hiddenlayer/types/interaction_analyze_params.py +62 -0
- hiddenlayer/types/interaction_analyze_response.py +199 -0
- hiddenlayer/types/model_retrieve_response.py +50 -0
- hiddenlayer/types/models/__init__.py +6 -0
- hiddenlayer/types/models/card_list_params.py +65 -0
- hiddenlayer/types/models/card_list_response.py +50 -0
- hiddenlayer/types/prompt_analyzer_create_params.py +23 -0
- hiddenlayer/types/prompt_analyzer_create_response.py +381 -0
- hiddenlayer/types/scans/__init__.py +14 -0
- hiddenlayer/types/scans/job_list_params.py +75 -0
- hiddenlayer/types/scans/job_list_response.py +22 -0
- hiddenlayer/types/scans/job_request_params.py +49 -0
- hiddenlayer/types/scans/job_retrieve_params.py +16 -0
- hiddenlayer/types/scans/result_sarif_response.py +7 -0
- hiddenlayer/types/scans/scan_job.py +46 -0
- hiddenlayer/types/scans/scan_report.py +367 -0
- hiddenlayer/types/scans/upload/__init__.py +6 -0
- hiddenlayer/types/scans/upload/file_add_response.py +24 -0
- hiddenlayer/types/scans/upload/file_complete_response.py +12 -0
- hiddenlayer/types/scans/upload_complete_all_response.py +12 -0
- hiddenlayer/types/scans/upload_start_params.py +34 -0
- hiddenlayer/types/scans/upload_start_response.py +12 -0
- hiddenlayer/types/sensor_create_params.py +24 -0
- hiddenlayer/types/sensor_create_response.py +33 -0
- hiddenlayer/types/sensor_query_params.py +39 -0
- hiddenlayer/types/sensor_query_response.py +43 -0
- hiddenlayer/types/sensor_retrieve_response.py +33 -0
- hiddenlayer/types/sensor_update_params.py +20 -0
- hiddenlayer/types/sensor_update_response.py +9 -0
- hiddenlayer_sdk-3.0.0.dist-info/METADATA +431 -0
- hiddenlayer_sdk-3.0.0.dist-info/RECORD +82 -0
- {hiddenlayer_sdk-2.0.9.dist-info → hiddenlayer_sdk-3.0.0.dist-info}/WHEEL +1 -2
- {hiddenlayer_sdk-2.0.9.dist-info → hiddenlayer_sdk-3.0.0.dist-info}/licenses/LICENSE +1 -1
- hiddenlayer/sdk/constants.py +0 -26
- hiddenlayer/sdk/exceptions.py +0 -12
- hiddenlayer/sdk/models.py +0 -58
- hiddenlayer/sdk/rest/__init__.py +0 -135
- hiddenlayer/sdk/rest/api/__init__.py +0 -10
- hiddenlayer/sdk/rest/api/aidr_predictive_api.py +0 -308
- hiddenlayer/sdk/rest/api/health_api.py +0 -272
- hiddenlayer/sdk/rest/api/model_api.py +0 -559
- hiddenlayer/sdk/rest/api/model_supply_chain_api.py +0 -4063
- hiddenlayer/sdk/rest/api/readiness_api.py +0 -272
- hiddenlayer/sdk/rest/api/sensor_api.py +0 -1432
- hiddenlayer/sdk/rest/api_client.py +0 -770
- hiddenlayer/sdk/rest/api_response.py +0 -21
- hiddenlayer/sdk/rest/configuration.py +0 -445
- hiddenlayer/sdk/rest/exceptions.py +0 -199
- hiddenlayer/sdk/rest/models/__init__.py +0 -113
- hiddenlayer/sdk/rest/models/address.py +0 -110
- hiddenlayer/sdk/rest/models/artifact.py +0 -155
- hiddenlayer/sdk/rest/models/artifact_change.py +0 -108
- hiddenlayer/sdk/rest/models/artifact_content.py +0 -101
- hiddenlayer/sdk/rest/models/artifact_location.py +0 -109
- hiddenlayer/sdk/rest/models/attachment.py +0 -129
- hiddenlayer/sdk/rest/models/begin_multi_file_upload200_response.py +0 -87
- hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response.py +0 -97
- hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response_parts_inner.py +0 -94
- hiddenlayer/sdk/rest/models/code_flow.py +0 -113
- hiddenlayer/sdk/rest/models/configuration_override.py +0 -108
- hiddenlayer/sdk/rest/models/conversion.py +0 -114
- hiddenlayer/sdk/rest/models/create_sensor_request.py +0 -95
- hiddenlayer/sdk/rest/models/edge.py +0 -108
- hiddenlayer/sdk/rest/models/edge_traversal.py +0 -122
- hiddenlayer/sdk/rest/models/errors_inner.py +0 -91
- hiddenlayer/sdk/rest/models/exception.py +0 -113
- hiddenlayer/sdk/rest/models/external_properties.py +0 -273
- hiddenlayer/sdk/rest/models/external_property_file_reference.py +0 -102
- hiddenlayer/sdk/rest/models/external_property_file_references.py +0 -240
- hiddenlayer/sdk/rest/models/file_details_v3.py +0 -139
- hiddenlayer/sdk/rest/models/file_result_v3.py +0 -117
- hiddenlayer/sdk/rest/models/file_scan_report_v3.py +0 -132
- hiddenlayer/sdk/rest/models/file_scan_reports_v3.py +0 -95
- hiddenlayer/sdk/rest/models/fix.py +0 -113
- hiddenlayer/sdk/rest/models/get_condensed_model_scan_reports200_response.py +0 -102
- hiddenlayer/sdk/rest/models/graph.py +0 -123
- hiddenlayer/sdk/rest/models/graph_traversal.py +0 -97
- hiddenlayer/sdk/rest/models/inventory_v3.py +0 -101
- hiddenlayer/sdk/rest/models/invocation.py +0 -199
- hiddenlayer/sdk/rest/models/location.py +0 -146
- hiddenlayer/sdk/rest/models/location_inner.py +0 -138
- hiddenlayer/sdk/rest/models/location_relationship.py +0 -107
- hiddenlayer/sdk/rest/models/logical_location.py +0 -104
- hiddenlayer/sdk/rest/models/message.py +0 -92
- hiddenlayer/sdk/rest/models/mitre_atlas_inner.py +0 -110
- hiddenlayer/sdk/rest/models/model.py +0 -103
- hiddenlayer/sdk/rest/models/model_inventory_info.py +0 -103
- hiddenlayer/sdk/rest/models/model_version.py +0 -97
- hiddenlayer/sdk/rest/models/multi_file_upload_request_v3.py +0 -97
- hiddenlayer/sdk/rest/models/multiformat_message_string.py +0 -95
- hiddenlayer/sdk/rest/models/node.py +0 -122
- hiddenlayer/sdk/rest/models/notification.py +0 -157
- hiddenlayer/sdk/rest/models/notify_model_scan_completed200_response.py +0 -87
- hiddenlayer/sdk/rest/models/paged_response_with_total.py +0 -94
- hiddenlayer/sdk/rest/models/pagination_v3.py +0 -95
- hiddenlayer/sdk/rest/models/physical_location.py +0 -94
- hiddenlayer/sdk/rest/models/problem_details.py +0 -103
- hiddenlayer/sdk/rest/models/property_bag.py +0 -101
- hiddenlayer/sdk/rest/models/rectangle.py +0 -110
- hiddenlayer/sdk/rest/models/region.py +0 -127
- hiddenlayer/sdk/rest/models/replacement.py +0 -103
- hiddenlayer/sdk/rest/models/reporting_configuration.py +0 -113
- hiddenlayer/sdk/rest/models/reporting_descriptor.py +0 -162
- hiddenlayer/sdk/rest/models/reporting_descriptor_reference.py +0 -103
- hiddenlayer/sdk/rest/models/reporting_descriptor_relationship.py +0 -115
- hiddenlayer/sdk/rest/models/result.py +0 -312
- hiddenlayer/sdk/rest/models/result_provenance.py +0 -133
- hiddenlayer/sdk/rest/models/rule_details_inner.py +0 -102
- hiddenlayer/sdk/rest/models/run.py +0 -318
- hiddenlayer/sdk/rest/models/run_automation_details.py +0 -129
- hiddenlayer/sdk/rest/models/sarif210.py +0 -123
- hiddenlayer/sdk/rest/models/scan_create_request.py +0 -87
- hiddenlayer/sdk/rest/models/scan_detection_v3.py +0 -159
- hiddenlayer/sdk/rest/models/scan_detection_v31.py +0 -158
- hiddenlayer/sdk/rest/models/scan_header_v3.py +0 -129
- hiddenlayer/sdk/rest/models/scan_job.py +0 -115
- hiddenlayer/sdk/rest/models/scan_job_access.py +0 -97
- hiddenlayer/sdk/rest/models/scan_model_details_v3.py +0 -99
- hiddenlayer/sdk/rest/models/scan_model_details_v31.py +0 -97
- hiddenlayer/sdk/rest/models/scan_model_ids_v3.py +0 -89
- hiddenlayer/sdk/rest/models/scan_report_v3.py +0 -139
- hiddenlayer/sdk/rest/models/scan_results_map_v3.py +0 -105
- hiddenlayer/sdk/rest/models/scan_results_v3.py +0 -120
- hiddenlayer/sdk/rest/models/security_posture.py +0 -89
- hiddenlayer/sdk/rest/models/sensor.py +0 -100
- hiddenlayer/sdk/rest/models/sensor_query_response.py +0 -101
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_query_response.py +0 -101
- hiddenlayer/sdk/rest/models/sensor_sor_model_card_response.py +0 -127
- hiddenlayer/sdk/rest/models/sensor_sor_query_filter.py +0 -108
- hiddenlayer/sdk/rest/models/sensor_sor_query_request.py +0 -109
- hiddenlayer/sdk/rest/models/special_locations.py +0 -97
- hiddenlayer/sdk/rest/models/stack.py +0 -113
- hiddenlayer/sdk/rest/models/stack_frame.py +0 -104
- hiddenlayer/sdk/rest/models/submission_response.py +0 -95
- hiddenlayer/sdk/rest/models/submission_v2.py +0 -109
- hiddenlayer/sdk/rest/models/suppression.py +0 -133
- hiddenlayer/sdk/rest/models/thread_flow.py +0 -144
- hiddenlayer/sdk/rest/models/thread_flow_location.py +0 -166
- hiddenlayer/sdk/rest/models/tool.py +0 -107
- hiddenlayer/sdk/rest/models/tool_component.py +0 -251
- hiddenlayer/sdk/rest/models/tool_component_reference.py +0 -108
- hiddenlayer/sdk/rest/models/translation_metadata.py +0 -110
- hiddenlayer/sdk/rest/models/validation_error_model.py +0 -99
- hiddenlayer/sdk/rest/models/version_control_details.py +0 -108
- hiddenlayer/sdk/rest/models/web_request.py +0 -112
- hiddenlayer/sdk/rest/models/web_response.py +0 -112
- hiddenlayer/sdk/rest/rest.py +0 -257
- hiddenlayer/sdk/services/__init__.py +0 -0
- hiddenlayer/sdk/services/aidr_predictive.py +0 -130
- hiddenlayer/sdk/services/model_scan.py +0 -505
- hiddenlayer/sdk/utils.py +0 -92
- hiddenlayer/sdk/version.py +0 -1
- hiddenlayer_sdk-2.0.9.dist-info/METADATA +0 -368
- hiddenlayer_sdk-2.0.9.dist-info/RECORD +0 -126
- hiddenlayer_sdk-2.0.9.dist-info/top_level.txt +0 -1
- /hiddenlayer/{sdk/__init__.py → py.typed} +0 -0
@@ -1,95 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
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, Optional
|
22
|
-
from hiddenlayer.sdk.rest.models.file_scan_report_v3 import FileScanReportV3
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
class FileScanReportsV3(BaseModel):
|
27
|
-
"""
|
28
|
-
FileScanReportsV3
|
29
|
-
""" # noqa: E501
|
30
|
-
file_results: Optional[List[FileScanReportV3]] = None
|
31
|
-
__properties: ClassVar[List[str]] = ["file_results"]
|
32
|
-
|
33
|
-
model_config = ConfigDict(
|
34
|
-
populate_by_name=True,
|
35
|
-
validate_assignment=True,
|
36
|
-
protected_namespaces=(),
|
37
|
-
)
|
38
|
-
|
39
|
-
|
40
|
-
def to_str(self) -> str:
|
41
|
-
"""Returns the string representation of the model using alias"""
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
43
|
-
|
44
|
-
def to_json(self) -> str:
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
47
|
-
return json.dumps(self.to_dict())
|
48
|
-
|
49
|
-
@classmethod
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
-
"""Create an instance of FileScanReportsV3 from a JSON string"""
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
53
|
-
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
56
|
-
|
57
|
-
This has the following differences from calling pydantic's
|
58
|
-
`self.model_dump(by_alias=True)`:
|
59
|
-
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
61
|
-
were set at model initialization. Other fields with value `None`
|
62
|
-
are ignored.
|
63
|
-
"""
|
64
|
-
excluded_fields: Set[str] = set([
|
65
|
-
])
|
66
|
-
|
67
|
-
_dict = self.model_dump(
|
68
|
-
by_alias=True,
|
69
|
-
exclude=excluded_fields,
|
70
|
-
exclude_none=True,
|
71
|
-
)
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of each item in file_results (list)
|
73
|
-
_items = []
|
74
|
-
if self.file_results:
|
75
|
-
for _item in self.file_results:
|
76
|
-
if _item:
|
77
|
-
_items.append(_item.to_dict())
|
78
|
-
_dict['file_results'] = _items
|
79
|
-
return _dict
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of FileScanReportsV3 from a dict"""
|
84
|
-
if obj is None:
|
85
|
-
return None
|
86
|
-
|
87
|
-
if not isinstance(obj, dict):
|
88
|
-
return cls.model_validate(obj)
|
89
|
-
|
90
|
-
_obj = cls.model_validate({
|
91
|
-
"file_results": [FileScanReportV3.from_dict(_item) for _item in obj["file_results"]] if obj.get("file_results") is not None else None
|
92
|
-
})
|
93
|
-
return _obj
|
94
|
-
|
95
|
-
|
@@ -1,113 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
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
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing_extensions import Annotated
|
23
|
-
from hiddenlayer.sdk.rest.models.artifact_change import ArtifactChange
|
24
|
-
from hiddenlayer.sdk.rest.models.message import Message
|
25
|
-
from hiddenlayer.sdk.rest.models.property_bag import PropertyBag
|
26
|
-
from typing import Optional, Set
|
27
|
-
from typing_extensions import Self
|
28
|
-
|
29
|
-
class Fix(BaseModel):
|
30
|
-
"""
|
31
|
-
A proposed fix for the problem represented by a result object. A fix specifies a set of artifacts to modify. For each artifact, it specifies a set of bytes to remove, and provides a set of new bytes to replace them.
|
32
|
-
""" # noqa: E501
|
33
|
-
description: Optional[Message] = None
|
34
|
-
artifact_changes: Annotated[List[ArtifactChange], Field(min_length=1)] = Field(description="One or more artifact changes that comprise a fix for a result.", alias="artifactChanges")
|
35
|
-
properties: Optional[PropertyBag] = None
|
36
|
-
__properties: ClassVar[List[str]] = ["description", "artifactChanges", "properties"]
|
37
|
-
|
38
|
-
model_config = ConfigDict(
|
39
|
-
populate_by_name=True,
|
40
|
-
validate_assignment=True,
|
41
|
-
protected_namespaces=(),
|
42
|
-
)
|
43
|
-
|
44
|
-
|
45
|
-
def to_str(self) -> str:
|
46
|
-
"""Returns the string representation of the model using alias"""
|
47
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
48
|
-
|
49
|
-
def to_json(self) -> str:
|
50
|
-
"""Returns the JSON representation of the model using alias"""
|
51
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
52
|
-
return json.dumps(self.to_dict())
|
53
|
-
|
54
|
-
@classmethod
|
55
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
56
|
-
"""Create an instance of Fix from a JSON string"""
|
57
|
-
return cls.from_dict(json.loads(json_str))
|
58
|
-
|
59
|
-
def to_dict(self) -> Dict[str, Any]:
|
60
|
-
"""Return the dictionary representation of the model using alias.
|
61
|
-
|
62
|
-
This has the following differences from calling pydantic's
|
63
|
-
`self.model_dump(by_alias=True)`:
|
64
|
-
|
65
|
-
* `None` is only added to the output dict for nullable fields that
|
66
|
-
were set at model initialization. Other fields with value `None`
|
67
|
-
are ignored.
|
68
|
-
"""
|
69
|
-
excluded_fields: Set[str] = set([
|
70
|
-
])
|
71
|
-
|
72
|
-
_dict = self.model_dump(
|
73
|
-
by_alias=True,
|
74
|
-
exclude=excluded_fields,
|
75
|
-
exclude_none=True,
|
76
|
-
)
|
77
|
-
# override the default output from pydantic by calling `to_dict()` of description
|
78
|
-
if self.description:
|
79
|
-
_dict['description'] = self.description.to_dict()
|
80
|
-
# override the default output from pydantic by calling `to_dict()` of each item in artifact_changes (list)
|
81
|
-
_items = []
|
82
|
-
if self.artifact_changes:
|
83
|
-
for _item in self.artifact_changes:
|
84
|
-
if _item:
|
85
|
-
_items.append(_item.to_dict())
|
86
|
-
_dict['artifactChanges'] = _items
|
87
|
-
# override the default output from pydantic by calling `to_dict()` of properties
|
88
|
-
if self.properties:
|
89
|
-
_dict['properties'] = self.properties.to_dict()
|
90
|
-
# set to None if description (nullable) is None
|
91
|
-
# and model_fields_set contains the field
|
92
|
-
if self.description is None and "description" in self.model_fields_set:
|
93
|
-
_dict['description'] = None
|
94
|
-
|
95
|
-
return _dict
|
96
|
-
|
97
|
-
@classmethod
|
98
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
99
|
-
"""Create an instance of Fix from a dict"""
|
100
|
-
if obj is None:
|
101
|
-
return None
|
102
|
-
|
103
|
-
if not isinstance(obj, dict):
|
104
|
-
return cls.model_validate(obj)
|
105
|
-
|
106
|
-
_obj = cls.model_validate({
|
107
|
-
"description": Message.from_dict(obj["description"]) if obj.get("description") is not None else None,
|
108
|
-
"artifactChanges": [ArtifactChange.from_dict(_item) for _item in obj["artifactChanges"]] if obj.get("artifactChanges") is not None else None,
|
109
|
-
"properties": PropertyBag.from_dict(obj["properties"]) if obj.get("properties") is not None else None
|
110
|
-
})
|
111
|
-
return _obj
|
112
|
-
|
113
|
-
|
@@ -1,102 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
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
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing_extensions import Annotated
|
23
|
-
from hiddenlayer.sdk.rest.models.scan_report_v3 import ScanReportV3
|
24
|
-
from typing import Optional, Set
|
25
|
-
from typing_extensions import Self
|
26
|
-
|
27
|
-
class GetCondensedModelScanReports200Response(BaseModel):
|
28
|
-
"""
|
29
|
-
GetCondensedModelScanReports200Response
|
30
|
-
""" # noqa: E501
|
31
|
-
items: Optional[List[ScanReportV3]] = None
|
32
|
-
total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Total number of items available based on the query criteria.")
|
33
|
-
limit: Annotated[int, Field(le=100, strict=True, ge=1)] = Field(description="Maximum number of items to return")
|
34
|
-
offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="Begin returning the results from this offset")
|
35
|
-
__properties: ClassVar[List[str]] = ["items", "total", "limit", "offset"]
|
36
|
-
|
37
|
-
model_config = ConfigDict(
|
38
|
-
populate_by_name=True,
|
39
|
-
validate_assignment=True,
|
40
|
-
protected_namespaces=(),
|
41
|
-
)
|
42
|
-
|
43
|
-
|
44
|
-
def to_str(self) -> str:
|
45
|
-
"""Returns the string representation of the model using alias"""
|
46
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
47
|
-
|
48
|
-
def to_json(self) -> str:
|
49
|
-
"""Returns the JSON representation of the model using alias"""
|
50
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
51
|
-
return json.dumps(self.to_dict())
|
52
|
-
|
53
|
-
@classmethod
|
54
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
55
|
-
"""Create an instance of GetCondensedModelScanReports200Response from a JSON string"""
|
56
|
-
return cls.from_dict(json.loads(json_str))
|
57
|
-
|
58
|
-
def to_dict(self) -> Dict[str, Any]:
|
59
|
-
"""Return the dictionary representation of the model using alias.
|
60
|
-
|
61
|
-
This has the following differences from calling pydantic's
|
62
|
-
`self.model_dump(by_alias=True)`:
|
63
|
-
|
64
|
-
* `None` is only added to the output dict for nullable fields that
|
65
|
-
were set at model initialization. Other fields with value `None`
|
66
|
-
are ignored.
|
67
|
-
"""
|
68
|
-
excluded_fields: Set[str] = set([
|
69
|
-
])
|
70
|
-
|
71
|
-
_dict = self.model_dump(
|
72
|
-
by_alias=True,
|
73
|
-
exclude=excluded_fields,
|
74
|
-
exclude_none=True,
|
75
|
-
)
|
76
|
-
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
77
|
-
_items = []
|
78
|
-
if self.items:
|
79
|
-
for _item in self.items:
|
80
|
-
if _item:
|
81
|
-
_items.append(_item.to_dict())
|
82
|
-
_dict['items'] = _items
|
83
|
-
return _dict
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
-
"""Create an instance of GetCondensedModelScanReports200Response 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
|
-
"items": [ScanReportV3.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
96
|
-
"total": obj.get("total"),
|
97
|
-
"limit": obj.get("limit") if obj.get("limit") is not None else 25,
|
98
|
-
"offset": obj.get("offset") if obj.get("offset") is not None else 0
|
99
|
-
})
|
100
|
-
return _obj
|
101
|
-
|
102
|
-
|
@@ -1,123 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
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
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing_extensions import Annotated
|
23
|
-
from hiddenlayer.sdk.rest.models.edge import Edge
|
24
|
-
from hiddenlayer.sdk.rest.models.message import Message
|
25
|
-
from hiddenlayer.sdk.rest.models.node import Node
|
26
|
-
from hiddenlayer.sdk.rest.models.property_bag import PropertyBag
|
27
|
-
from typing import Optional, Set
|
28
|
-
from typing_extensions import Self
|
29
|
-
|
30
|
-
class Graph(BaseModel):
|
31
|
-
"""
|
32
|
-
A network of nodes and directed edges that describes some aspect of the structure of the code (for example, a call graph).
|
33
|
-
""" # noqa: E501
|
34
|
-
description: Optional[Message] = None
|
35
|
-
nodes: Optional[Annotated[List[Node], Field(min_length=0)]] = Field(default=None, description="An array of node objects representing the nodes of the graph.")
|
36
|
-
edges: Optional[Annotated[List[Edge], Field(min_length=0)]] = Field(default=None, description="An array of edge objects representing the edges of the graph.")
|
37
|
-
properties: Optional[PropertyBag] = None
|
38
|
-
__properties: ClassVar[List[str]] = ["description", "nodes", "edges", "properties"]
|
39
|
-
|
40
|
-
model_config = ConfigDict(
|
41
|
-
populate_by_name=True,
|
42
|
-
validate_assignment=True,
|
43
|
-
protected_namespaces=(),
|
44
|
-
)
|
45
|
-
|
46
|
-
|
47
|
-
def to_str(self) -> str:
|
48
|
-
"""Returns the string representation of the model using alias"""
|
49
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
-
|
51
|
-
def to_json(self) -> str:
|
52
|
-
"""Returns the JSON representation of the model using alias"""
|
53
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
-
return json.dumps(self.to_dict())
|
55
|
-
|
56
|
-
@classmethod
|
57
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
-
"""Create an instance of Graph from a JSON string"""
|
59
|
-
return cls.from_dict(json.loads(json_str))
|
60
|
-
|
61
|
-
def to_dict(self) -> Dict[str, Any]:
|
62
|
-
"""Return the dictionary representation of the model using alias.
|
63
|
-
|
64
|
-
This has the following differences from calling pydantic's
|
65
|
-
`self.model_dump(by_alias=True)`:
|
66
|
-
|
67
|
-
* `None` is only added to the output dict for nullable fields that
|
68
|
-
were set at model initialization. Other fields with value `None`
|
69
|
-
are ignored.
|
70
|
-
"""
|
71
|
-
excluded_fields: Set[str] = set([
|
72
|
-
])
|
73
|
-
|
74
|
-
_dict = self.model_dump(
|
75
|
-
by_alias=True,
|
76
|
-
exclude=excluded_fields,
|
77
|
-
exclude_none=True,
|
78
|
-
)
|
79
|
-
# override the default output from pydantic by calling `to_dict()` of description
|
80
|
-
if self.description:
|
81
|
-
_dict['description'] = self.description.to_dict()
|
82
|
-
# override the default output from pydantic by calling `to_dict()` of each item in nodes (list)
|
83
|
-
_items = []
|
84
|
-
if self.nodes:
|
85
|
-
for _item in self.nodes:
|
86
|
-
if _item:
|
87
|
-
_items.append(_item.to_dict())
|
88
|
-
_dict['nodes'] = _items
|
89
|
-
# override the default output from pydantic by calling `to_dict()` of each item in edges (list)
|
90
|
-
_items = []
|
91
|
-
if self.edges:
|
92
|
-
for _item in self.edges:
|
93
|
-
if _item:
|
94
|
-
_items.append(_item.to_dict())
|
95
|
-
_dict['edges'] = _items
|
96
|
-
# override the default output from pydantic by calling `to_dict()` of properties
|
97
|
-
if self.properties:
|
98
|
-
_dict['properties'] = self.properties.to_dict()
|
99
|
-
# set to None if description (nullable) is None
|
100
|
-
# and model_fields_set contains the field
|
101
|
-
if self.description is None and "description" in self.model_fields_set:
|
102
|
-
_dict['description'] = None
|
103
|
-
|
104
|
-
return _dict
|
105
|
-
|
106
|
-
@classmethod
|
107
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
108
|
-
"""Create an instance of Graph from a dict"""
|
109
|
-
if obj is None:
|
110
|
-
return None
|
111
|
-
|
112
|
-
if not isinstance(obj, dict):
|
113
|
-
return cls.model_validate(obj)
|
114
|
-
|
115
|
-
_obj = cls.model_validate({
|
116
|
-
"description": Message.from_dict(obj["description"]) if obj.get("description") is not None else None,
|
117
|
-
"nodes": [Node.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None,
|
118
|
-
"edges": [Edge.from_dict(_item) for _item in obj["edges"]] if obj.get("edges") is not None else None,
|
119
|
-
"properties": PropertyBag.from_dict(obj["properties"]) if obj.get("properties") is not None else None
|
120
|
-
})
|
121
|
-
return _obj
|
122
|
-
|
123
|
-
|
@@ -1,97 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
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
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing_extensions import Annotated
|
23
|
-
from hiddenlayer.sdk.rest.models.edge_traversal import EdgeTraversal
|
24
|
-
from hiddenlayer.sdk.rest.models.message import Message
|
25
|
-
from hiddenlayer.sdk.rest.models.multiformat_message_string import MultiformatMessageString
|
26
|
-
from hiddenlayer.sdk.rest.models.property_bag import PropertyBag
|
27
|
-
from typing import Optional, Set
|
28
|
-
from typing_extensions import Self
|
29
|
-
|
30
|
-
class GraphTraversal(BaseModel):
|
31
|
-
"""
|
32
|
-
Represents a path through a graph.
|
33
|
-
""" # noqa: E501
|
34
|
-
run_graph_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = Field(default=-1, description="The index within the run.graphs to be associated with the result.", alias="runGraphIndex")
|
35
|
-
result_graph_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = Field(default=-1, description="The index within the result.graphs to be associated with the result.", alias="resultGraphIndex")
|
36
|
-
description: Optional[Message] = None
|
37
|
-
initial_state: Optional[Dict[str, MultiformatMessageString]] = Field(default=None, description="Values of relevant expressions at the start of the graph traversal that may change during graph traversal.", alias="initialState")
|
38
|
-
immutable_state: Optional[Dict[str, MultiformatMessageString]] = Field(default=None, description="Values of relevant expressions at the start of the graph traversal that remain constant for the graph traversal.", alias="immutableState")
|
39
|
-
edge_traversals: Optional[Annotated[List[EdgeTraversal], Field(min_length=0)]] = Field(default=None, description="The sequences of edges traversed by this graph traversal.", alias="edgeTraversals")
|
40
|
-
properties: Optional[PropertyBag] = None
|
41
|
-
__properties: ClassVar[List[str]] = []
|
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 GraphTraversal 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 GraphTraversal 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
|
-
})
|
95
|
-
return _obj
|
96
|
-
|
97
|
-
|
@@ -1,101 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
HiddenLayer-API
|
5
|
-
|
6
|
-
HiddenLayer-API
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 1
|
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
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
class InventoryV3(BaseModel):
|
26
|
-
"""
|
27
|
-
InventoryV3
|
28
|
-
""" # noqa: E501
|
29
|
-
requested_scan_location: Optional[StrictStr] = None
|
30
|
-
model_name: Optional[StrictStr] = None
|
31
|
-
model_source: Optional[StrictStr] = None
|
32
|
-
model_version: Optional[StrictStr] = None
|
33
|
-
model_version_id: Optional[StrictStr] = None
|
34
|
-
requesting_entity: Optional[StrictStr] = None
|
35
|
-
request_source: Optional[StrictStr] = Field(default=None, description="Identifies the system that requested the scan")
|
36
|
-
origin: Optional[StrictStr] = Field(default=None, description="Specifies the platform or service where the model originated before being scanned")
|
37
|
-
__properties: ClassVar[List[str]] = ["requested_scan_location", "model_name", "model_source", "model_version", "model_version_id", "requesting_entity", "request_source", "origin"]
|
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 InventoryV3 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 InventoryV3 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
|
-
"requested_scan_location": obj.get("requested_scan_location"),
|
91
|
-
"model_name": obj.get("model_name"),
|
92
|
-
"model_source": obj.get("model_source"),
|
93
|
-
"model_version": obj.get("model_version"),
|
94
|
-
"model_version_id": obj.get("model_version_id"),
|
95
|
-
"requesting_entity": obj.get("requesting_entity"),
|
96
|
-
"request_source": obj.get("request_source"),
|
97
|
-
"origin": obj.get("origin")
|
98
|
-
})
|
99
|
-
return _obj
|
100
|
-
|
101
|
-
|