qi-compute-api-client 0.7.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.

Files changed (165) hide show
  1. compute_api_client/__init__.py +22 -19
  2. compute_api_client/api/__init__.py +5 -6
  3. compute_api_client/api/algorithms_api.py +1333 -553
  4. compute_api_client/api/backend_api.py +1501 -0
  5. compute_api_client/api/backend_types_api.py +684 -0
  6. compute_api_client/api/batch_jobs_api.py +1937 -0
  7. compute_api_client/api/commits_api.py +1068 -435
  8. compute_api_client/api/files_api.py +1075 -435
  9. compute_api_client/api/final_results_api.py +736 -338
  10. compute_api_client/api/jobs_api.py +1653 -0
  11. compute_api_client/api/languages_api.py +556 -217
  12. compute_api_client/api/members_api.py +1057 -435
  13. compute_api_client/api/metadata_api.py +736 -337
  14. compute_api_client/api/permissions_api.py +1055 -421
  15. compute_api_client/api/projects_api.py +1604 -676
  16. compute_api_client/api/reservations_api.py +1124 -427
  17. compute_api_client/api/results_api.py +738 -337
  18. compute_api_client/api/teams_api.py +567 -220
  19. compute_api_client/api/transactions_api.py +679 -218
  20. compute_api_client/api/users_api.py +1090 -435
  21. compute_api_client/api_client.py +346 -304
  22. compute_api_client/api_response.py +21 -0
  23. compute_api_client/configuration.py +54 -67
  24. compute_api_client/docs/Algorithm.md +20 -3
  25. compute_api_client/docs/AlgorithmIn.md +20 -3
  26. compute_api_client/docs/AlgorithmType.md +0 -1
  27. compute_api_client/docs/AlgorithmsApi.md +78 -77
  28. compute_api_client/docs/Backend.md +33 -0
  29. compute_api_client/docs/BackendApi.md +419 -0
  30. compute_api_client/docs/BackendPatch.md +29 -0
  31. compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
  32. compute_api_client/docs/BackendType.md +36 -0
  33. compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
  34. compute_api_client/docs/BackendWithAuthentication.md +34 -0
  35. compute_api_client/docs/BatchJob.md +38 -0
  36. compute_api_client/docs/BatchJobIn.md +29 -0
  37. compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
  38. compute_api_client/docs/{BatchRunsApi.md → BatchJobsApi.md} +170 -147
  39. compute_api_client/docs/Commit.md +18 -1
  40. compute_api_client/docs/CommitIn.md +17 -0
  41. compute_api_client/docs/CommitsApi.md +62 -71
  42. compute_api_client/docs/CompileStage.md +0 -1
  43. compute_api_client/docs/Domain.md +0 -1
  44. compute_api_client/docs/File.md +21 -4
  45. compute_api_client/docs/FileIn.md +21 -4
  46. compute_api_client/docs/FilesApi.md +65 -71
  47. compute_api_client/docs/FinalResult.md +20 -3
  48. compute_api_client/docs/FinalResultIn.md +19 -2
  49. compute_api_client/docs/FinalResultsApi.md +44 -71
  50. compute_api_client/docs/HTTPNotFoundError.md +17 -0
  51. compute_api_client/docs/HTTPValidationError.md +18 -1
  52. compute_api_client/docs/Job.md +36 -0
  53. compute_api_client/docs/JobIn.md +31 -0
  54. compute_api_client/docs/JobPatch.md +28 -0
  55. compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
  56. compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
  57. compute_api_client/docs/Language.md +17 -0
  58. compute_api_client/docs/LanguagesApi.md +30 -12
  59. compute_api_client/docs/LocationInner.md +17 -0
  60. compute_api_client/docs/Member.md +19 -2
  61. compute_api_client/docs/MemberIn.md +19 -2
  62. compute_api_client/docs/MembersApi.md +59 -24
  63. compute_api_client/docs/Metadata.md +20 -3
  64. compute_api_client/docs/MetadataApi.md +49 -33
  65. compute_api_client/docs/MetadataIn.md +19 -2
  66. compute_api_client/docs/Permission.md +17 -0
  67. compute_api_client/docs/PermissionGroup.md +17 -0
  68. compute_api_client/docs/PermissionsApi.md +68 -28
  69. compute_api_client/docs/Project.md +20 -3
  70. compute_api_client/docs/ProjectIn.md +18 -1
  71. compute_api_client/docs/ProjectPatch.md +19 -2
  72. compute_api_client/docs/ProjectsApi.md +84 -36
  73. compute_api_client/docs/Reservation.md +21 -4
  74. compute_api_client/docs/ReservationIn.md +19 -2
  75. compute_api_client/docs/ReservationsApi.md +66 -24
  76. compute_api_client/docs/Result.md +23 -6
  77. compute_api_client/docs/ResultIn.md +19 -2
  78. compute_api_client/docs/ResultsApi.md +42 -26
  79. compute_api_client/docs/Role.md +0 -1
  80. compute_api_client/docs/ShareType.md +0 -1
  81. compute_api_client/docs/Team.md +18 -1
  82. compute_api_client/docs/TeamsApi.md +37 -14
  83. compute_api_client/docs/Transaction.md +21 -4
  84. compute_api_client/docs/TransactionsApi.md +50 -14
  85. compute_api_client/docs/User.md +21 -4
  86. compute_api_client/docs/UserIn.md +17 -0
  87. compute_api_client/docs/UsersApi.md +62 -24
  88. compute_api_client/docs/ValidationError.md +18 -1
  89. compute_api_client/exceptions.py +19 -16
  90. compute_api_client/models/__init__.py +16 -14
  91. compute_api_client/models/algorithm.py +78 -237
  92. compute_api_client/models/algorithm_in.py +76 -204
  93. compute_api_client/models/algorithm_type.py +21 -87
  94. compute_api_client/models/backend.py +100 -0
  95. compute_api_client/models/backend_patch.py +90 -0
  96. compute_api_client/models/backend_status.py +47 -0
  97. compute_api_client/models/backend_type.py +105 -0
  98. compute_api_client/models/backend_with_authentication.py +102 -0
  99. compute_api_client/models/batch_job.py +129 -0
  100. compute_api_client/models/batch_job_in.py +89 -0
  101. compute_api_client/models/batch_job_status.py +48 -0
  102. compute_api_client/models/commit.py +72 -230
  103. compute_api_client/models/commit_in.py +67 -169
  104. compute_api_client/models/compile_stage.py +23 -89
  105. compute_api_client/models/domain.py +22 -88
  106. compute_api_client/models/file.py +74 -288
  107. compute_api_client/models/file_in.py +72 -254
  108. compute_api_client/models/final_result.py +68 -198
  109. compute_api_client/models/final_result_in.py +63 -137
  110. compute_api_client/models/http_not_found_error.py +60 -105
  111. compute_api_client/models/http_validation_error.py +69 -105
  112. compute_api_client/models/job.py +120 -0
  113. compute_api_client/models/job_in.py +99 -0
  114. compute_api_client/models/job_patch.py +88 -0
  115. compute_api_client/models/job_status.py +48 -0
  116. compute_api_client/models/language.py +67 -172
  117. compute_api_client/models/location_inner.py +125 -84
  118. compute_api_client/models/member.py +70 -236
  119. compute_api_client/models/member_in.py +68 -203
  120. compute_api_client/models/metadata.py +68 -198
  121. compute_api_client/models/metadata_in.py +68 -137
  122. compute_api_client/models/permission.py +67 -172
  123. compute_api_client/models/permission_group.py +65 -142
  124. compute_api_client/models/project.py +74 -256
  125. compute_api_client/models/project_in.py +69 -195
  126. compute_api_client/models/project_patch.py +89 -192
  127. compute_api_client/models/reservation.py +79 -290
  128. compute_api_client/models/reservation_in.py +68 -200
  129. compute_api_client/models/result.py +101 -359
  130. compute_api_client/models/result_in.py +95 -291
  131. compute_api_client/models/role.py +21 -87
  132. compute_api_client/models/share_type.py +22 -88
  133. compute_api_client/models/team.py +69 -198
  134. compute_api_client/models/transaction.py +93 -299
  135. compute_api_client/models/user.py +75 -276
  136. compute_api_client/models/user_in.py +73 -243
  137. compute_api_client/models/validation_error.py +73 -160
  138. compute_api_client/rest.py +55 -114
  139. {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
  140. qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
  141. compute_api_client/api/batch_runs_api.py +0 -862
  142. compute_api_client/api/runs_api.py +0 -723
  143. compute_api_client/api/runtime_api.py +0 -449
  144. compute_api_client/api/runtime_types_api.py +0 -303
  145. compute_api_client/docs/BatchRun.md +0 -21
  146. compute_api_client/docs/BatchRunIn.md +0 -12
  147. compute_api_client/docs/Run.md +0 -19
  148. compute_api_client/docs/RunIn.md +0 -14
  149. compute_api_client/docs/Runtime.md +0 -16
  150. compute_api_client/docs/RuntimeApi.md +0 -229
  151. compute_api_client/docs/RuntimeType.md +0 -19
  152. compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
  153. compute_api_client/models/batch_run.py +0 -423
  154. compute_api_client/models/batch_run_in.py +0 -171
  155. compute_api_client/models/batch_run_status.py +0 -114
  156. compute_api_client/models/run.py +0 -376
  157. compute_api_client/models/run_in.py +0 -233
  158. compute_api_client/models/run_status.py +0 -114
  159. compute_api_client/models/runtime.py +0 -290
  160. compute_api_client/models/runtime_status.py +0 -113
  161. compute_api_client/models/runtime_type.py +0 -357
  162. compute_api_client/models/runtime_with_authentication.py +0 -320
  163. qi_compute_api_client-0.7.0.dist-info/RECORD +0 -137
  164. {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
  165. {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
@@ -1,114 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Quantum Inspire 2
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- try:
14
- from inspect import getfullargspec
15
- except ImportError:
16
- from inspect import getargspec as getfullargspec
17
- import pprint
18
- import re # noqa: F401
19
- import six
20
-
21
- from compute_api_client.configuration import Configuration
22
-
23
-
24
- class RunStatus(object):
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
- allowed enum values
33
- """
34
- PLANNED = "planned"
35
- RUNNING = "running"
36
- COMPLETED = "completed"
37
- CANCELLED = "cancelled"
38
- FAILED = "failed"
39
-
40
- allowable_values = [PLANNED, RUNNING, COMPLETED, CANCELLED, FAILED] # noqa: E501
41
-
42
- """
43
- Attributes:
44
- openapi_types (dict): The key is attribute name
45
- and the value is attribute type.
46
- attribute_map (dict): The key is attribute name
47
- and the value is json key in definition.
48
- """
49
- openapi_types = {
50
- }
51
-
52
- attribute_map = {
53
- }
54
-
55
- def __init__(self, local_vars_configuration=None): # noqa: E501
56
- """RunStatus - a model defined in OpenAPI""" # noqa: E501
57
- if local_vars_configuration is None:
58
- local_vars_configuration = Configuration.get_default_copy()
59
- self.local_vars_configuration = local_vars_configuration
60
- self.discriminator = None
61
-
62
- def to_dict(self, serialize=False):
63
- """Returns the model properties as a dict"""
64
- result = {}
65
-
66
- def convert(x):
67
- if hasattr(x, "to_dict"):
68
- args = getfullargspec(x.to_dict).args
69
- if len(args) == 1:
70
- return x.to_dict()
71
- else:
72
- return x.to_dict(serialize)
73
- else:
74
- return x
75
-
76
- for attr, _ in six.iteritems(self.openapi_types):
77
- value = getattr(self, attr)
78
- attr = self.attribute_map.get(attr, attr) if serialize else attr
79
- if isinstance(value, list):
80
- result[attr] = list(map(
81
- lambda x: convert(x),
82
- value
83
- ))
84
- elif isinstance(value, dict):
85
- result[attr] = dict(map(
86
- lambda item: (item[0], convert(item[1])),
87
- value.items()
88
- ))
89
- else:
90
- result[attr] = convert(value)
91
-
92
- return result
93
-
94
- def to_str(self):
95
- """Returns the string representation of the model"""
96
- return pprint.pformat(self.to_dict())
97
-
98
- def __repr__(self):
99
- """For `print` and `pprint`"""
100
- return self.to_str()
101
-
102
- def __eq__(self, other):
103
- """Returns true if both objects are equal"""
104
- if not isinstance(other, RunStatus):
105
- return False
106
-
107
- return self.to_dict() == other.to_dict()
108
-
109
- def __ne__(self, other):
110
- """Returns true if both objects are not equal"""
111
- if not isinstance(other, RunStatus):
112
- return True
113
-
114
- return self.to_dict() != other.to_dict()
@@ -1,290 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Quantum Inspire 2
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- try:
14
- from inspect import getfullargspec
15
- except ImportError:
16
- from inspect import getargspec as getfullargspec
17
- import pprint
18
- import re # noqa: F401
19
- import six
20
-
21
- from compute_api_client.configuration import Configuration
22
-
23
-
24
- class Runtime(object):
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.
37
- """
38
- openapi_types = {
39
- 'id': 'int',
40
- 'name': 'str',
41
- 'location': 'str',
42
- 'status': 'RuntimeStatus',
43
- 'last_heartbeat': 'datetime',
44
- 'runtime_type_id': 'int'
45
- }
46
-
47
- attribute_map = {
48
- 'id': 'id',
49
- 'name': 'name',
50
- 'location': 'location',
51
- 'status': 'status',
52
- 'last_heartbeat': 'last_heartbeat',
53
- 'runtime_type_id': 'runtime_type_id'
54
- }
55
-
56
- def __init__(self, id=None, name=None, location=None, status=None, last_heartbeat=None, runtime_type_id=None, local_vars_configuration=None): # noqa: E501
57
- """Runtime - a model defined in OpenAPI""" # noqa: E501
58
- if local_vars_configuration is None:
59
- local_vars_configuration = Configuration.get_default_copy()
60
- self.local_vars_configuration = local_vars_configuration
61
-
62
- self._id = None
63
- self._name = None
64
- self._location = None
65
- self._status = None
66
- self._last_heartbeat = None
67
- self._runtime_type_id = None
68
- self.discriminator = None
69
-
70
- self.id = id
71
- self.name = name
72
- self.location = location
73
- self.status = status
74
- self.last_heartbeat = last_heartbeat
75
- self.runtime_type_id = runtime_type_id
76
-
77
- @property
78
- def id(self):
79
- """Gets the id of this Runtime. # noqa: E501
80
-
81
-
82
- :return: The id of this Runtime. # noqa: E501
83
- :rtype: int
84
- """
85
- return self._id
86
-
87
- @id.setter
88
- def id(self, id):
89
- """Sets the id of this Runtime.
90
-
91
-
92
- :param id: The id of this Runtime. # noqa: E501
93
- :type id: int
94
- """
95
- if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
96
- raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
97
- if (self.local_vars_configuration.client_side_validation and
98
- id is not None and id > 2147483647): # noqa: E501
99
- raise ValueError("Invalid value for `id`, must be a value less than or equal to `2147483647`") # noqa: E501
100
- if (self.local_vars_configuration.client_side_validation and
101
- id is not None and id < 1): # noqa: E501
102
- raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
103
-
104
- self._id = id
105
-
106
- @property
107
- def name(self):
108
- """Gets the name of this Runtime. # noqa: E501
109
-
110
-
111
- :return: The name of this Runtime. # noqa: E501
112
- :rtype: str
113
- """
114
- return self._name
115
-
116
- @name.setter
117
- def name(self, name):
118
- """Sets the name of this Runtime.
119
-
120
-
121
- :param name: The name of this Runtime. # noqa: E501
122
- :type name: str
123
- """
124
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
125
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
126
- if (self.local_vars_configuration.client_side_validation and
127
- name is not None and len(name) > 32):
128
- raise ValueError("Invalid value for `name`, length must be less than or equal to `32`") # noqa: E501
129
-
130
- self._name = name
131
-
132
- @property
133
- def location(self):
134
- """Gets the location of this Runtime. # noqa: E501
135
-
136
-
137
- :return: The location of this Runtime. # noqa: E501
138
- :rtype: str
139
- """
140
- return self._location
141
-
142
- @location.setter
143
- def location(self, location):
144
- """Sets the location of this Runtime.
145
-
146
-
147
- :param location: The location of this Runtime. # noqa: E501
148
- :type location: str
149
- """
150
- if self.local_vars_configuration.client_side_validation and location is None: # noqa: E501
151
- raise ValueError("Invalid value for `location`, must not be `None`") # noqa: E501
152
- if (self.local_vars_configuration.client_side_validation and
153
- location is not None and len(location) > 32):
154
- raise ValueError("Invalid value for `location`, length must be less than or equal to `32`") # noqa: E501
155
-
156
- self._location = location
157
-
158
- @property
159
- def status(self):
160
- """Gets the status of this Runtime. # noqa: E501
161
-
162
- OFFLINE: offline<br/>IDLE: idle<br/>EXECUTING: executing<br/>CALIBRATING: calibrating # noqa: E501
163
-
164
- :return: The status of this Runtime. # noqa: E501
165
- :rtype: RuntimeStatus
166
- """
167
- return self._status
168
-
169
- @status.setter
170
- def status(self, status):
171
- """Sets the status of this Runtime.
172
-
173
- OFFLINE: offline<br/>IDLE: idle<br/>EXECUTING: executing<br/>CALIBRATING: calibrating # noqa: E501
174
-
175
- :param status: The status of this Runtime. # noqa: E501
176
- :type status: RuntimeStatus
177
- """
178
- if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
179
- raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
180
- if (self.local_vars_configuration.client_side_validation and
181
- status is not None and len(status) > 11):
182
- raise ValueError("Invalid value for `status`, length must be less than or equal to `11`") # noqa: E501
183
-
184
- self._status = status
185
-
186
- @property
187
- def last_heartbeat(self):
188
- """Gets the last_heartbeat of this Runtime. # noqa: E501
189
-
190
-
191
- :return: The last_heartbeat of this Runtime. # noqa: E501
192
- :rtype: datetime
193
- """
194
- return self._last_heartbeat
195
-
196
- @last_heartbeat.setter
197
- def last_heartbeat(self, last_heartbeat):
198
- """Sets the last_heartbeat of this Runtime.
199
-
200
-
201
- :param last_heartbeat: The last_heartbeat of this Runtime. # noqa: E501
202
- :type last_heartbeat: datetime
203
- """
204
- if self.local_vars_configuration.client_side_validation and last_heartbeat is None: # noqa: E501
205
- raise ValueError("Invalid value for `last_heartbeat`, must not be `None`") # noqa: E501
206
-
207
- self._last_heartbeat = last_heartbeat
208
-
209
- @property
210
- def runtime_type_id(self):
211
- """Gets the runtime_type_id of this Runtime. # noqa: E501
212
-
213
-
214
- :return: The runtime_type_id of this Runtime. # noqa: E501
215
- :rtype: int
216
- """
217
- return self._runtime_type_id
218
-
219
- @runtime_type_id.setter
220
- def runtime_type_id(self, runtime_type_id):
221
- """Sets the runtime_type_id of this Runtime.
222
-
223
-
224
- :param runtime_type_id: The runtime_type_id of this Runtime. # noqa: E501
225
- :type runtime_type_id: int
226
- """
227
- if self.local_vars_configuration.client_side_validation and runtime_type_id is None: # noqa: E501
228
- raise ValueError("Invalid value for `runtime_type_id`, must not be `None`") # noqa: E501
229
- if (self.local_vars_configuration.client_side_validation and
230
- runtime_type_id is not None and runtime_type_id > 2147483647): # noqa: E501
231
- raise ValueError("Invalid value for `runtime_type_id`, must be a value less than or equal to `2147483647`") # noqa: E501
232
- if (self.local_vars_configuration.client_side_validation and
233
- runtime_type_id is not None and runtime_type_id < 1): # noqa: E501
234
- raise ValueError("Invalid value for `runtime_type_id`, must be a value greater than or equal to `1`") # noqa: E501
235
-
236
- self._runtime_type_id = runtime_type_id
237
-
238
- def to_dict(self, serialize=False):
239
- """Returns the model properties as a dict"""
240
- result = {}
241
-
242
- def convert(x):
243
- if hasattr(x, "to_dict"):
244
- args = getfullargspec(x.to_dict).args
245
- if len(args) == 1:
246
- return x.to_dict()
247
- else:
248
- return x.to_dict(serialize)
249
- else:
250
- return x
251
-
252
- for attr, _ in six.iteritems(self.openapi_types):
253
- value = getattr(self, attr)
254
- attr = self.attribute_map.get(attr, attr) if serialize else attr
255
- if isinstance(value, list):
256
- result[attr] = list(map(
257
- lambda x: convert(x),
258
- value
259
- ))
260
- elif isinstance(value, dict):
261
- result[attr] = dict(map(
262
- lambda item: (item[0], convert(item[1])),
263
- value.items()
264
- ))
265
- else:
266
- result[attr] = convert(value)
267
-
268
- return result
269
-
270
- def to_str(self):
271
- """Returns the string representation of the model"""
272
- return pprint.pformat(self.to_dict())
273
-
274
- def __repr__(self):
275
- """For `print` and `pprint`"""
276
- return self.to_str()
277
-
278
- def __eq__(self, other):
279
- """Returns true if both objects are equal"""
280
- if not isinstance(other, Runtime):
281
- return False
282
-
283
- return self.to_dict() == other.to_dict()
284
-
285
- def __ne__(self, other):
286
- """Returns true if both objects are not equal"""
287
- if not isinstance(other, Runtime):
288
- return True
289
-
290
- return self.to_dict() != other.to_dict()
@@ -1,113 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Quantum Inspire 2
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- try:
14
- from inspect import getfullargspec
15
- except ImportError:
16
- from inspect import getargspec as getfullargspec
17
- import pprint
18
- import re # noqa: F401
19
- import six
20
-
21
- from compute_api_client.configuration import Configuration
22
-
23
-
24
- class RuntimeStatus(object):
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
- allowed enum values
33
- """
34
- OFFLINE = "offline"
35
- IDLE = "idle"
36
- EXECUTING = "executing"
37
- CALIBRATING = "calibrating"
38
-
39
- allowable_values = [OFFLINE, IDLE, EXECUTING, CALIBRATING] # noqa: E501
40
-
41
- """
42
- Attributes:
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.
47
- """
48
- openapi_types = {
49
- }
50
-
51
- attribute_map = {
52
- }
53
-
54
- def __init__(self, local_vars_configuration=None): # noqa: E501
55
- """RuntimeStatus - 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, RuntimeStatus):
104
- return False
105
-
106
- return self.to_dict() == other.to_dict()
107
-
108
- def __ne__(self, other):
109
- """Returns true if both objects are not equal"""
110
- if not isinstance(other, RuntimeStatus):
111
- return True
112
-
113
- return self.to_dict() != other.to_dict()