qi-compute-api-client 0.4.0__py3-none-any.whl → 0.17.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.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +23 -20
- compute_api_client/api/__init__.py +5 -6
- compute_api_client/api/algorithms_api.py +1334 -554
- compute_api_client/api/backend_api.py +1501 -0
- compute_api_client/api/backend_types_api.py +684 -0
- compute_api_client/api/batch_jobs_api.py +1937 -0
- compute_api_client/api/commits_api.py +1069 -436
- compute_api_client/api/files_api.py +1076 -436
- compute_api_client/api/final_results_api.py +737 -339
- compute_api_client/api/jobs_api.py +1653 -0
- compute_api_client/api/languages_api.py +557 -218
- compute_api_client/api/members_api.py +1058 -436
- compute_api_client/api/metadata_api.py +737 -338
- compute_api_client/api/permissions_api.py +1056 -422
- compute_api_client/api/projects_api.py +1605 -677
- compute_api_client/api/reservations_api.py +1125 -428
- compute_api_client/api/results_api.py +739 -338
- compute_api_client/api/teams_api.py +568 -221
- compute_api_client/api/transactions_api.py +680 -219
- compute_api_client/api/users_api.py +1091 -436
- compute_api_client/api_client.py +347 -305
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +55 -68
- compute_api_client/docs/Algorithm.md +20 -3
- compute_api_client/docs/AlgorithmIn.md +20 -3
- compute_api_client/docs/AlgorithmType.md +0 -1
- compute_api_client/docs/AlgorithmsApi.md +78 -77
- compute_api_client/docs/Backend.md +33 -0
- compute_api_client/docs/BackendApi.md +419 -0
- compute_api_client/docs/BackendPatch.md +29 -0
- compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
- compute_api_client/docs/BackendType.md +36 -0
- compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
- compute_api_client/docs/BackendWithAuthentication.md +34 -0
- compute_api_client/docs/BatchJob.md +38 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
- compute_api_client/docs/BatchJobsApi.md +524 -0
- compute_api_client/docs/Commit.md +18 -1
- compute_api_client/docs/CommitIn.md +17 -0
- compute_api_client/docs/CommitsApi.md +62 -71
- compute_api_client/docs/CompileStage.md +0 -1
- compute_api_client/docs/Domain.md +0 -1
- compute_api_client/docs/File.md +21 -4
- compute_api_client/docs/FileIn.md +21 -4
- compute_api_client/docs/FilesApi.md +65 -71
- compute_api_client/docs/FinalResult.md +20 -3
- compute_api_client/docs/FinalResultIn.md +19 -2
- compute_api_client/docs/FinalResultsApi.md +44 -71
- compute_api_client/docs/HTTPNotFoundError.md +17 -0
- compute_api_client/docs/HTTPValidationError.md +18 -1
- compute_api_client/docs/Job.md +36 -0
- compute_api_client/docs/JobIn.md +31 -0
- compute_api_client/docs/JobPatch.md +28 -0
- compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
- compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
- compute_api_client/docs/Language.md +17 -0
- compute_api_client/docs/LanguagesApi.md +30 -12
- compute_api_client/docs/LocationInner.md +17 -0
- compute_api_client/docs/Member.md +19 -2
- compute_api_client/docs/MemberIn.md +19 -2
- compute_api_client/docs/MembersApi.md +59 -24
- compute_api_client/docs/Metadata.md +20 -3
- compute_api_client/docs/MetadataApi.md +49 -33
- compute_api_client/docs/MetadataIn.md +19 -2
- compute_api_client/docs/Permission.md +17 -0
- compute_api_client/docs/PermissionGroup.md +17 -0
- compute_api_client/docs/PermissionsApi.md +68 -28
- compute_api_client/docs/Project.md +20 -3
- compute_api_client/docs/ProjectIn.md +18 -1
- compute_api_client/docs/ProjectPatch.md +19 -2
- compute_api_client/docs/ProjectsApi.md +84 -36
- compute_api_client/docs/Reservation.md +21 -4
- compute_api_client/docs/ReservationIn.md +19 -2
- compute_api_client/docs/ReservationsApi.md +66 -24
- compute_api_client/docs/Result.md +23 -6
- compute_api_client/docs/ResultIn.md +19 -2
- compute_api_client/docs/ResultsApi.md +40 -74
- compute_api_client/docs/Role.md +0 -1
- compute_api_client/docs/ShareType.md +0 -1
- compute_api_client/docs/Team.md +18 -1
- compute_api_client/docs/TeamsApi.md +37 -14
- compute_api_client/docs/Transaction.md +21 -4
- compute_api_client/docs/TransactionsApi.md +50 -14
- compute_api_client/docs/User.md +21 -4
- compute_api_client/docs/UserIn.md +17 -0
- compute_api_client/docs/UsersApi.md +62 -24
- compute_api_client/docs/ValidationError.md +18 -1
- compute_api_client/exceptions.py +20 -17
- compute_api_client/models/__init__.py +17 -15
- compute_api_client/models/algorithm.py +79 -238
- compute_api_client/models/algorithm_in.py +77 -205
- compute_api_client/models/algorithm_type.py +22 -88
- compute_api_client/models/backend.py +100 -0
- compute_api_client/models/backend_patch.py +90 -0
- compute_api_client/models/backend_status.py +47 -0
- compute_api_client/models/backend_type.py +105 -0
- compute_api_client/models/backend_with_authentication.py +102 -0
- compute_api_client/models/batch_job.py +129 -0
- compute_api_client/models/batch_job_in.py +89 -0
- compute_api_client/models/batch_job_status.py +48 -0
- compute_api_client/models/commit.py +73 -231
- compute_api_client/models/commit_in.py +68 -170
- compute_api_client/models/compile_stage.py +24 -90
- compute_api_client/models/domain.py +23 -89
- compute_api_client/models/file.py +75 -289
- compute_api_client/models/file_in.py +73 -255
- compute_api_client/models/final_result.py +69 -199
- compute_api_client/models/final_result_in.py +64 -138
- compute_api_client/models/http_not_found_error.py +61 -106
- compute_api_client/models/http_validation_error.py +70 -106
- compute_api_client/models/job.py +120 -0
- compute_api_client/models/job_in.py +99 -0
- compute_api_client/models/job_patch.py +88 -0
- compute_api_client/models/job_status.py +48 -0
- compute_api_client/models/language.py +68 -173
- compute_api_client/models/location_inner.py +126 -85
- compute_api_client/models/member.py +71 -237
- compute_api_client/models/member_in.py +69 -204
- compute_api_client/models/metadata.py +69 -199
- compute_api_client/models/metadata_in.py +69 -138
- compute_api_client/models/permission.py +68 -173
- compute_api_client/models/permission_group.py +66 -143
- compute_api_client/models/project.py +75 -257
- compute_api_client/models/project_in.py +70 -196
- compute_api_client/models/project_patch.py +90 -193
- compute_api_client/models/reservation.py +80 -291
- compute_api_client/models/reservation_in.py +69 -201
- compute_api_client/models/result.py +102 -360
- compute_api_client/models/result_in.py +96 -293
- compute_api_client/models/role.py +22 -88
- compute_api_client/models/share_type.py +23 -89
- compute_api_client/models/team.py +70 -199
- compute_api_client/models/transaction.py +94 -300
- compute_api_client/models/user.py +76 -277
- compute_api_client/models/user_in.py +74 -244
- compute_api_client/models/validation_error.py +74 -161
- compute_api_client/rest.py +56 -115
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
- qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
- compute_api_client/api/batch_runs_api.py +0 -862
- compute_api_client/api/runs_api.py +0 -723
- compute_api_client/api/runtime_api.py +0 -449
- compute_api_client/api/runtime_types_api.py +0 -303
- compute_api_client/docs/BatchRun.md +0 -21
- compute_api_client/docs/BatchRunIn.md +0 -12
- compute_api_client/docs/BatchRunsApi.md +0 -600
- compute_api_client/docs/Run.md +0 -18
- compute_api_client/docs/RunIn.md +0 -13
- compute_api_client/docs/Runtime.md +0 -16
- compute_api_client/docs/RuntimeApi.md +0 -229
- compute_api_client/docs/RuntimeType.md +0 -19
- compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
- compute_api_client/models/batch_run.py +0 -423
- compute_api_client/models/batch_run_in.py +0 -171
- compute_api_client/models/batch_run_status.py +0 -114
- compute_api_client/models/run.py +0 -345
- compute_api_client/models/run_in.py +0 -202
- compute_api_client/models/run_status.py +0 -114
- compute_api_client/models/runtime.py +0 -290
- compute_api_client/models/runtime_status.py +0 -113
- compute_api_client/models/runtime_type.py +0 -357
- compute_api_client/models/runtime_with_authentication.py +0 -320
- qi_compute_api_client-0.4.0.dist-info/RECORD +0 -137
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -1,113 +1,47 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
17
|
import pprint
|
|
18
18
|
import re # noqa: F401
|
|
19
|
-
import
|
|
19
|
+
from enum import Enum
|
|
20
20
|
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
22
21
|
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
27
27
|
|
|
28
|
-
Do not edit the class manually.
|
|
29
|
-
"""
|
|
30
28
|
|
|
29
|
+
class CompileStage(str, Enum):
|
|
31
30
|
"""
|
|
32
|
-
|
|
31
|
+
CompileStage
|
|
33
32
|
"""
|
|
34
|
-
NONE = "none"
|
|
35
|
-
MAPPED = "mapped"
|
|
36
|
-
NATIVE_GATESET = "native_gateset"
|
|
37
|
-
SCHEDULED = "scheduled"
|
|
38
|
-
|
|
39
|
-
allowable_values = [NONE, MAPPED, NATIVE_GATESET, SCHEDULED] # noqa: E501
|
|
40
33
|
|
|
41
34
|
"""
|
|
42
|
-
|
|
43
|
-
openapi_types (dict): The key is attribute name
|
|
44
|
-
and the value is attribute type.
|
|
45
|
-
attribute_map (dict): The key is attribute name
|
|
46
|
-
and the value is json key in definition.
|
|
35
|
+
allowed enum values
|
|
47
36
|
"""
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
def __init__(self, local_vars_configuration=None): # noqa: E501
|
|
55
|
-
"""CompileStage - a model defined in OpenAPI""" # noqa: E501
|
|
56
|
-
if local_vars_configuration is None:
|
|
57
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
58
|
-
self.local_vars_configuration = local_vars_configuration
|
|
59
|
-
self.discriminator = None
|
|
60
|
-
|
|
61
|
-
def to_dict(self, serialize=False):
|
|
62
|
-
"""Returns the model properties as a dict"""
|
|
63
|
-
result = {}
|
|
64
|
-
|
|
65
|
-
def convert(x):
|
|
66
|
-
if hasattr(x, "to_dict"):
|
|
67
|
-
args = getfullargspec(x.to_dict).args
|
|
68
|
-
if len(args) == 1:
|
|
69
|
-
return x.to_dict()
|
|
70
|
-
else:
|
|
71
|
-
return x.to_dict(serialize)
|
|
72
|
-
else:
|
|
73
|
-
return x
|
|
74
|
-
|
|
75
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
76
|
-
value = getattr(self, attr)
|
|
77
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
78
|
-
if isinstance(value, list):
|
|
79
|
-
result[attr] = list(map(
|
|
80
|
-
lambda x: convert(x),
|
|
81
|
-
value
|
|
82
|
-
))
|
|
83
|
-
elif isinstance(value, dict):
|
|
84
|
-
result[attr] = dict(map(
|
|
85
|
-
lambda item: (item[0], convert(item[1])),
|
|
86
|
-
value.items()
|
|
87
|
-
))
|
|
88
|
-
else:
|
|
89
|
-
result[attr] = convert(value)
|
|
90
|
-
|
|
91
|
-
return result
|
|
92
|
-
|
|
93
|
-
def to_str(self):
|
|
94
|
-
"""Returns the string representation of the model"""
|
|
95
|
-
return pprint.pformat(self.to_dict())
|
|
96
|
-
|
|
97
|
-
def __repr__(self):
|
|
98
|
-
"""For `print` and `pprint`"""
|
|
99
|
-
return self.to_str()
|
|
100
|
-
|
|
101
|
-
def __eq__(self, other):
|
|
102
|
-
"""Returns true if both objects are equal"""
|
|
103
|
-
if not isinstance(other, CompileStage):
|
|
104
|
-
return False
|
|
37
|
+
NONE = 'none'
|
|
38
|
+
MAPPED = 'mapped'
|
|
39
|
+
NATIVE_GATESET = 'native_gateset'
|
|
40
|
+
SCHEDULED = 'scheduled'
|
|
105
41
|
|
|
106
|
-
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_json(cls, json_str: str) -> Self:
|
|
44
|
+
"""Create an instance of CompileStage from a JSON string"""
|
|
45
|
+
return cls(json.loads(json_str))
|
|
107
46
|
|
|
108
|
-
def __ne__(self, other):
|
|
109
|
-
"""Returns true if both objects are not equal"""
|
|
110
|
-
if not isinstance(other, CompileStage):
|
|
111
|
-
return True
|
|
112
47
|
|
|
113
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -1,112 +1,46 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
17
|
import pprint
|
|
18
18
|
import re # noqa: F401
|
|
19
|
-
import
|
|
19
|
+
from enum import Enum
|
|
20
20
|
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
22
21
|
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
27
27
|
|
|
28
|
-
Do not edit the class manually.
|
|
29
|
-
"""
|
|
30
28
|
|
|
29
|
+
class Domain(str, Enum):
|
|
31
30
|
"""
|
|
32
|
-
|
|
31
|
+
Domain
|
|
33
32
|
"""
|
|
34
|
-
COMPUTE = "compute"
|
|
35
|
-
NETWORKING = "networking"
|
|
36
|
-
SIMULATE = "simulate"
|
|
37
|
-
|
|
38
|
-
allowable_values = [COMPUTE, NETWORKING, SIMULATE] # noqa: E501
|
|
39
33
|
|
|
40
34
|
"""
|
|
41
|
-
|
|
42
|
-
openapi_types (dict): The key is attribute name
|
|
43
|
-
and the value is attribute type.
|
|
44
|
-
attribute_map (dict): The key is attribute name
|
|
45
|
-
and the value is json key in definition.
|
|
35
|
+
allowed enum values
|
|
46
36
|
"""
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
attribute_map = {
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
def __init__(self, local_vars_configuration=None): # noqa: E501
|
|
54
|
-
"""Domain - a model defined in OpenAPI""" # noqa: E501
|
|
55
|
-
if local_vars_configuration is None:
|
|
56
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
57
|
-
self.local_vars_configuration = local_vars_configuration
|
|
58
|
-
self.discriminator = None
|
|
59
|
-
|
|
60
|
-
def to_dict(self, serialize=False):
|
|
61
|
-
"""Returns the model properties as a dict"""
|
|
62
|
-
result = {}
|
|
63
|
-
|
|
64
|
-
def convert(x):
|
|
65
|
-
if hasattr(x, "to_dict"):
|
|
66
|
-
args = getfullargspec(x.to_dict).args
|
|
67
|
-
if len(args) == 1:
|
|
68
|
-
return x.to_dict()
|
|
69
|
-
else:
|
|
70
|
-
return x.to_dict(serialize)
|
|
71
|
-
else:
|
|
72
|
-
return x
|
|
73
|
-
|
|
74
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
75
|
-
value = getattr(self, attr)
|
|
76
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
77
|
-
if isinstance(value, list):
|
|
78
|
-
result[attr] = list(map(
|
|
79
|
-
lambda x: convert(x),
|
|
80
|
-
value
|
|
81
|
-
))
|
|
82
|
-
elif isinstance(value, dict):
|
|
83
|
-
result[attr] = dict(map(
|
|
84
|
-
lambda item: (item[0], convert(item[1])),
|
|
85
|
-
value.items()
|
|
86
|
-
))
|
|
87
|
-
else:
|
|
88
|
-
result[attr] = convert(value)
|
|
89
|
-
|
|
90
|
-
return result
|
|
91
|
-
|
|
92
|
-
def to_str(self):
|
|
93
|
-
"""Returns the string representation of the model"""
|
|
94
|
-
return pprint.pformat(self.to_dict())
|
|
95
|
-
|
|
96
|
-
def __repr__(self):
|
|
97
|
-
"""For `print` and `pprint`"""
|
|
98
|
-
return self.to_str()
|
|
99
|
-
|
|
100
|
-
def __eq__(self, other):
|
|
101
|
-
"""Returns true if both objects are equal"""
|
|
102
|
-
if not isinstance(other, Domain):
|
|
103
|
-
return False
|
|
37
|
+
COMPUTE = 'compute'
|
|
38
|
+
NETWORKING = 'networking'
|
|
39
|
+
SIMULATE = 'simulate'
|
|
104
40
|
|
|
105
|
-
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_json(cls, json_str: str) -> Self:
|
|
43
|
+
"""Create an instance of Domain from a JSON string"""
|
|
44
|
+
return cls(json.loads(json_str))
|
|
106
45
|
|
|
107
|
-
def __ne__(self, other):
|
|
108
|
-
"""Returns true if both objects are not equal"""
|
|
109
|
-
if not isinstance(other, Domain):
|
|
110
|
-
return True
|
|
111
46
|
|
|
112
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -1,314 +1,100 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
except ImportError:
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
17
16
|
import pprint
|
|
18
17
|
import re # noqa: F401
|
|
19
|
-
import
|
|
18
|
+
import json
|
|
20
19
|
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
22
20
|
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
|
|
23
|
+
from compute_api_client.models.compile_stage import CompileStage
|
|
24
|
+
try:
|
|
25
|
+
from typing import Self
|
|
26
|
+
except ImportError:
|
|
27
|
+
from typing_extensions import Self
|
|
23
28
|
|
|
24
|
-
class File(
|
|
25
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
26
|
-
Ref: https://openapi-generator.tech
|
|
27
|
-
|
|
28
|
-
Do not edit the class manually.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
"""
|
|
32
|
-
Attributes:
|
|
33
|
-
openapi_types (dict): The key is attribute name
|
|
34
|
-
and the value is attribute type.
|
|
35
|
-
attribute_map (dict): The key is attribute name
|
|
36
|
-
and the value is json key in definition.
|
|
29
|
+
class File(BaseModel):
|
|
37
30
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
File
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
id: StrictInt
|
|
34
|
+
commit_id: StrictInt
|
|
35
|
+
content: StrictStr
|
|
36
|
+
language_id: StrictInt
|
|
37
|
+
compile_stage: CompileStage
|
|
38
|
+
compile_properties: Union[str, Any]
|
|
39
|
+
generated: StrictBool
|
|
40
|
+
__properties: ClassVar[List[str]] = ["id", "commit_id", "content", "language_id", "compile_stage", "compile_properties", "generated"]
|
|
41
|
+
|
|
42
|
+
model_config = {
|
|
43
|
+
"populate_by_name": True,
|
|
44
|
+
"validate_assignment": True
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
attribute_map = {
|
|
49
|
-
'id': 'id',
|
|
50
|
-
'content': 'content',
|
|
51
|
-
'compile_stage': 'compile_stage',
|
|
52
|
-
'compile_properties': 'compile_properties',
|
|
53
|
-
'generated': 'generated',
|
|
54
|
-
'commit_id': 'commit_id',
|
|
55
|
-
'language_id': 'language_id'
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
def __init__(self, id=None, content=None, compile_stage=None, compile_properties=None, generated=False, commit_id=None, language_id=None, local_vars_configuration=None): # noqa: E501
|
|
59
|
-
"""File - a model defined in OpenAPI""" # noqa: E501
|
|
60
|
-
if local_vars_configuration is None:
|
|
61
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
62
|
-
self.local_vars_configuration = local_vars_configuration
|
|
63
|
-
|
|
64
|
-
self._id = None
|
|
65
|
-
self._content = None
|
|
66
|
-
self._compile_stage = None
|
|
67
|
-
self._compile_properties = None
|
|
68
|
-
self._generated = None
|
|
69
|
-
self._commit_id = None
|
|
70
|
-
self._language_id = None
|
|
71
|
-
self.discriminator = None
|
|
72
|
-
|
|
73
|
-
self.id = id
|
|
74
|
-
self.content = content
|
|
75
|
-
self.compile_stage = compile_stage
|
|
76
|
-
self.compile_properties = compile_properties
|
|
77
|
-
if generated is not None:
|
|
78
|
-
self.generated = generated
|
|
79
|
-
self.commit_id = commit_id
|
|
80
|
-
self.language_id = language_id
|
|
81
|
-
|
|
82
|
-
@property
|
|
83
|
-
def id(self):
|
|
84
|
-
"""Gets the id of this File. # noqa: E501
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:return: The id of this File. # noqa: E501
|
|
88
|
-
:rtype: int
|
|
89
|
-
"""
|
|
90
|
-
return self._id
|
|
91
|
-
|
|
92
|
-
@id.setter
|
|
93
|
-
def id(self, id):
|
|
94
|
-
"""Sets the id of this File.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
:param id: The id of this File. # noqa: E501
|
|
98
|
-
:type id: int
|
|
99
|
-
"""
|
|
100
|
-
if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
|
|
101
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
|
102
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
103
|
-
id is not None and id > 2147483647): # noqa: E501
|
|
104
|
-
raise ValueError("Invalid value for `id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
105
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
106
|
-
id is not None and id < 1): # noqa: E501
|
|
107
|
-
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
108
|
-
|
|
109
|
-
self._id = id
|
|
110
|
-
|
|
111
|
-
@property
|
|
112
|
-
def content(self):
|
|
113
|
-
"""Gets the content of this File. # noqa: E501
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:return: The content of this File. # noqa: E501
|
|
117
|
-
:rtype: str
|
|
118
|
-
"""
|
|
119
|
-
return self._content
|
|
120
|
-
|
|
121
|
-
@content.setter
|
|
122
|
-
def content(self, content):
|
|
123
|
-
"""Sets the content of this File.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
:param content: The content of this File. # noqa: E501
|
|
127
|
-
:type content: str
|
|
128
|
-
"""
|
|
129
|
-
if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501
|
|
130
|
-
raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501
|
|
131
|
-
|
|
132
|
-
self._content = content
|
|
133
|
-
|
|
134
|
-
@property
|
|
135
|
-
def compile_stage(self):
|
|
136
|
-
"""Gets the compile_stage of this File. # noqa: E501
|
|
137
|
-
|
|
138
|
-
NONE: none<br/>MAPPED: mapped<br/>NATIVE_GATESET: native_gateset<br/>SCHEDULED: scheduled # noqa: E501
|
|
139
|
-
|
|
140
|
-
:return: The compile_stage of this File. # noqa: E501
|
|
141
|
-
:rtype: CompileStage
|
|
142
|
-
"""
|
|
143
|
-
return self._compile_stage
|
|
144
|
-
|
|
145
|
-
@compile_stage.setter
|
|
146
|
-
def compile_stage(self, compile_stage):
|
|
147
|
-
"""Sets the compile_stage of this File.
|
|
148
|
-
|
|
149
|
-
NONE: none<br/>MAPPED: mapped<br/>NATIVE_GATESET: native_gateset<br/>SCHEDULED: scheduled # noqa: E501
|
|
150
47
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if self.local_vars_configuration.client_side_validation and compile_stage is None: # noqa: E501
|
|
155
|
-
raise ValueError("Invalid value for `compile_stage`, must not be `None`") # noqa: E501
|
|
156
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
157
|
-
compile_stage is not None and len(compile_stage) > 14):
|
|
158
|
-
raise ValueError("Invalid value for `compile_stage`, length must be less than or equal to `14`") # noqa: E501
|
|
159
|
-
|
|
160
|
-
self._compile_stage = compile_stage
|
|
161
|
-
|
|
162
|
-
@property
|
|
163
|
-
def compile_properties(self):
|
|
164
|
-
"""Gets the compile_properties of this File. # noqa: E501
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
:return: The compile_properties of this File. # noqa: E501
|
|
168
|
-
:rtype: object
|
|
169
|
-
"""
|
|
170
|
-
return self._compile_properties
|
|
171
|
-
|
|
172
|
-
@compile_properties.setter
|
|
173
|
-
def compile_properties(self, compile_properties):
|
|
174
|
-
"""Sets the compile_properties of this File.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
:param compile_properties: The compile_properties of this File. # noqa: E501
|
|
178
|
-
:type compile_properties: object
|
|
179
|
-
"""
|
|
180
|
-
|
|
181
|
-
self._compile_properties = compile_properties
|
|
182
|
-
|
|
183
|
-
@property
|
|
184
|
-
def generated(self):
|
|
185
|
-
"""Gets the generated of this File. # noqa: E501
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
:return: The generated of this File. # noqa: E501
|
|
189
|
-
:rtype: bool
|
|
190
|
-
"""
|
|
191
|
-
return self._generated
|
|
192
|
-
|
|
193
|
-
@generated.setter
|
|
194
|
-
def generated(self, generated):
|
|
195
|
-
"""Sets the generated of this File.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
:param generated: The generated of this File. # noqa: E501
|
|
199
|
-
:type generated: bool
|
|
200
|
-
"""
|
|
201
|
-
|
|
202
|
-
self._generated = generated
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
203
51
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
207
56
|
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Self:
|
|
59
|
+
"""Create an instance of File from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
208
61
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
"""
|
|
212
|
-
return self._commit_id
|
|
213
|
-
|
|
214
|
-
@commit_id.setter
|
|
215
|
-
def commit_id(self, commit_id):
|
|
216
|
-
"""Sets the commit_id of this File.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
:param commit_id: The commit_id of this File. # noqa: E501
|
|
220
|
-
:type commit_id: int
|
|
221
|
-
"""
|
|
222
|
-
if self.local_vars_configuration.client_side_validation and commit_id is None: # noqa: E501
|
|
223
|
-
raise ValueError("Invalid value for `commit_id`, must not be `None`") # noqa: E501
|
|
224
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
225
|
-
commit_id is not None and commit_id > 2147483647): # noqa: E501
|
|
226
|
-
raise ValueError("Invalid value for `commit_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
227
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
228
|
-
commit_id is not None and commit_id < 1): # noqa: E501
|
|
229
|
-
raise ValueError("Invalid value for `commit_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
230
|
-
|
|
231
|
-
self._commit_id = commit_id
|
|
232
|
-
|
|
233
|
-
@property
|
|
234
|
-
def language_id(self):
|
|
235
|
-
"""Gets the language_id of this File. # noqa: E501
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
:return: The language_id of this File. # noqa: E501
|
|
239
|
-
:rtype: int
|
|
240
|
-
"""
|
|
241
|
-
return self._language_id
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
242
64
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
"""Sets the language_id of this File.
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
246
67
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
250
71
|
"""
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
279
|
-
if isinstance(value, list):
|
|
280
|
-
result[attr] = list(map(
|
|
281
|
-
lambda x: convert(x),
|
|
282
|
-
value
|
|
283
|
-
))
|
|
284
|
-
elif isinstance(value, dict):
|
|
285
|
-
result[attr] = dict(map(
|
|
286
|
-
lambda item: (item[0], convert(item[1])),
|
|
287
|
-
value.items()
|
|
288
|
-
))
|
|
289
|
-
else:
|
|
290
|
-
result[attr] = convert(value)
|
|
291
|
-
|
|
292
|
-
return result
|
|
293
|
-
|
|
294
|
-
def to_str(self):
|
|
295
|
-
"""Returns the string representation of the model"""
|
|
296
|
-
return pprint.pformat(self.to_dict())
|
|
297
|
-
|
|
298
|
-
def __repr__(self):
|
|
299
|
-
"""For `print` and `pprint`"""
|
|
300
|
-
return self.to_str()
|
|
301
|
-
|
|
302
|
-
def __eq__(self, other):
|
|
303
|
-
"""Returns true if both objects are equal"""
|
|
304
|
-
if not isinstance(other, File):
|
|
305
|
-
return False
|
|
306
|
-
|
|
307
|
-
return self.to_dict() == other.to_dict()
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude={
|
|
75
|
+
},
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
82
|
+
"""Create an instance of File 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
|
+
"id": obj.get("id"),
|
|
91
|
+
"commit_id": obj.get("commit_id"),
|
|
92
|
+
"content": obj.get("content"),
|
|
93
|
+
"language_id": obj.get("language_id"),
|
|
94
|
+
"compile_stage": obj.get("compile_stage"),
|
|
95
|
+
"compile_properties": obj.get("compile_properties"),
|
|
96
|
+
"generated": obj.get("generated")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
308
99
|
|
|
309
|
-
def __ne__(self, other):
|
|
310
|
-
"""Returns true if both objects are not equal"""
|
|
311
|
-
if not isinstance(other, File):
|
|
312
|
-
return True
|
|
313
100
|
|
|
314
|
-
return self.to_dict() != other.to_dict()
|