qi-compute-api-client 0.32.0__py3-none-any.whl → 0.35.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 (134) hide show
  1. compute_api_client/__init__.py +20 -1
  2. compute_api_client/api/__init__.py +1 -0
  3. compute_api_client/api/algorithms_api.py +76 -75
  4. compute_api_client/api/backend_api.py +78 -75
  5. compute_api_client/api/backend_types_api.py +95 -75
  6. compute_api_client/api/batch_jobs_api.py +77 -74
  7. compute_api_client/api/commits_api.py +78 -75
  8. compute_api_client/api/files_api.py +78 -75
  9. compute_api_client/api/final_results_api.py +1 -1
  10. compute_api_client/api/health_api.py +290 -0
  11. compute_api_client/api/jobs_api.py +78 -75
  12. compute_api_client/api/languages_api.py +76 -73
  13. compute_api_client/api/members_api.py +78 -75
  14. compute_api_client/api/metadata_api.py +79 -8
  15. compute_api_client/api/permissions_api.py +146 -142
  16. compute_api_client/api/projects_api.py +76 -75
  17. compute_api_client/api/reservations_api.py +78 -75
  18. compute_api_client/api/results_api.py +151 -80
  19. compute_api_client/api/teams_api.py +78 -75
  20. compute_api_client/api/transactions_api.py +78 -75
  21. compute_api_client/api/users_api.py +78 -75
  22. compute_api_client/api_client.py +1 -1
  23. compute_api_client/configuration.py +1 -1
  24. compute_api_client/docs/AlgorithmsApi.md +12 -12
  25. compute_api_client/docs/BackendApi.md +12 -12
  26. compute_api_client/docs/BackendType.md +3 -1
  27. compute_api_client/docs/BackendTypesApi.md +14 -12
  28. compute_api_client/docs/BatchJobsApi.md +12 -12
  29. compute_api_client/docs/CommitsApi.md +12 -12
  30. compute_api_client/docs/FilesApi.md +12 -12
  31. compute_api_client/docs/HealthApi.md +71 -0
  32. compute_api_client/docs/JobsApi.md +12 -12
  33. compute_api_client/docs/LanguagesApi.md +12 -12
  34. compute_api_client/docs/MembersApi.md +12 -12
  35. compute_api_client/docs/MetadataApi.md +12 -4
  36. compute_api_client/docs/PageAlgorithm.md +32 -0
  37. compute_api_client/docs/PageBackend.md +32 -0
  38. compute_api_client/docs/PageBackendType.md +32 -0
  39. compute_api_client/docs/PageBatchJob.md +32 -0
  40. compute_api_client/docs/PageCommit.md +32 -0
  41. compute_api_client/docs/PageFile.md +32 -0
  42. compute_api_client/docs/PageJob.md +32 -0
  43. compute_api_client/docs/PageLanguage.md +32 -0
  44. compute_api_client/docs/PageMember.md +32 -0
  45. compute_api_client/docs/PageMetadata.md +32 -0
  46. compute_api_client/docs/PagePermission.md +32 -0
  47. compute_api_client/docs/PagePermissionGroup.md +32 -0
  48. compute_api_client/docs/PageProject.md +32 -0
  49. compute_api_client/docs/PageReservation.md +32 -0
  50. compute_api_client/docs/PageResult.md +32 -0
  51. compute_api_client/docs/PageTeam.md +32 -0
  52. compute_api_client/docs/PageTransaction.md +32 -0
  53. compute_api_client/docs/PageUser.md +32 -0
  54. compute_api_client/docs/PermissionsApi.md +24 -24
  55. compute_api_client/docs/ProjectsApi.md +12 -12
  56. compute_api_client/docs/ReservationsApi.md +12 -12
  57. compute_api_client/docs/ResultsApi.md +24 -16
  58. compute_api_client/docs/TeamsApi.md +12 -12
  59. compute_api_client/docs/TransactionsApi.md +12 -12
  60. compute_api_client/docs/UsersApi.md +12 -12
  61. compute_api_client/exceptions.py +1 -1
  62. compute_api_client/models/__init__.py +19 -1
  63. compute_api_client/models/algorithm.py +1 -1
  64. compute_api_client/models/algorithm_in.py +1 -1
  65. compute_api_client/models/algorithm_type.py +1 -1
  66. compute_api_client/models/backend.py +1 -1
  67. compute_api_client/models/backend_in.py +1 -1
  68. compute_api_client/models/backend_patch.py +1 -1
  69. compute_api_client/models/backend_status.py +1 -1
  70. compute_api_client/models/backend_type.py +8 -4
  71. compute_api_client/models/backend_with_authentication.py +1 -1
  72. compute_api_client/models/batch_job.py +1 -1
  73. compute_api_client/models/batch_job_in.py +1 -1
  74. compute_api_client/models/batch_job_status.py +1 -1
  75. compute_api_client/models/commit.py +1 -1
  76. compute_api_client/models/commit_in.py +1 -1
  77. compute_api_client/models/compile_stage.py +1 -1
  78. compute_api_client/models/domain.py +1 -1
  79. compute_api_client/models/file.py +1 -1
  80. compute_api_client/models/file_in.py +1 -1
  81. compute_api_client/models/final_result.py +1 -1
  82. compute_api_client/models/final_result_in.py +1 -1
  83. compute_api_client/models/http_not_found_error.py +1 -1
  84. compute_api_client/models/http_validation_error.py +1 -1
  85. compute_api_client/models/job.py +1 -1
  86. compute_api_client/models/job_in.py +1 -1
  87. compute_api_client/models/job_patch.py +1 -1
  88. compute_api_client/models/job_status.py +1 -1
  89. compute_api_client/models/language.py +1 -1
  90. compute_api_client/models/location_inner.py +1 -1
  91. compute_api_client/models/member.py +1 -1
  92. compute_api_client/models/member_in.py +1 -1
  93. compute_api_client/models/metadata.py +1 -1
  94. compute_api_client/models/metadata_in.py +1 -1
  95. compute_api_client/models/page_algorithm.py +125 -0
  96. compute_api_client/models/page_backend.py +125 -0
  97. compute_api_client/models/page_backend_type.py +125 -0
  98. compute_api_client/models/page_batch_job.py +125 -0
  99. compute_api_client/models/page_commit.py +125 -0
  100. compute_api_client/models/page_file.py +125 -0
  101. compute_api_client/models/page_job.py +125 -0
  102. compute_api_client/models/page_language.py +125 -0
  103. compute_api_client/models/page_member.py +125 -0
  104. compute_api_client/models/page_metadata.py +125 -0
  105. compute_api_client/models/page_permission.py +125 -0
  106. compute_api_client/models/page_permission_group.py +125 -0
  107. compute_api_client/models/page_project.py +125 -0
  108. compute_api_client/models/page_reservation.py +125 -0
  109. compute_api_client/models/page_result.py +125 -0
  110. compute_api_client/models/page_team.py +125 -0
  111. compute_api_client/models/page_transaction.py +125 -0
  112. compute_api_client/models/page_user.py +125 -0
  113. compute_api_client/models/permission.py +1 -1
  114. compute_api_client/models/permission_group.py +1 -1
  115. compute_api_client/models/project.py +1 -1
  116. compute_api_client/models/project_in.py +1 -1
  117. compute_api_client/models/project_patch.py +1 -1
  118. compute_api_client/models/reservation.py +1 -1
  119. compute_api_client/models/reservation_in.py +1 -1
  120. compute_api_client/models/result.py +1 -1
  121. compute_api_client/models/result_in.py +1 -1
  122. compute_api_client/models/role.py +1 -1
  123. compute_api_client/models/share_type.py +1 -1
  124. compute_api_client/models/team.py +1 -1
  125. compute_api_client/models/transaction.py +1 -1
  126. compute_api_client/models/user.py +1 -1
  127. compute_api_client/models/user_in.py +1 -1
  128. compute_api_client/models/validation_error.py +1 -1
  129. compute_api_client/rest.py +1 -1
  130. {qi_compute_api_client-0.32.0.dist-info → qi_compute_api_client-0.35.0.dist-info}/METADATA +22 -3
  131. qi_compute_api_client-0.35.0.dist-info/RECORD +182 -0
  132. qi_compute_api_client-0.32.0.dist-info/RECORD +0 -144
  133. {qi_compute_api_client-0.32.0.dist-info → qi_compute_api_client-0.35.0.dist-info}/LICENSE.md +0 -0
  134. {qi_compute_api_client-0.32.0.dist-info → qi_compute_api_client-0.35.0.dist-info}/WHEEL +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Quantum Inspire 2
5
5
 
6
- **Sorting and Pagination of list endpoints** The api provides sorting and pagination for list endpoints. The following parameters can be passed as query parameters to get sorted and paginated list. - `latest` - **Type**: Boolean. - **Description**: Get the most recently created object. Defaults to False. - `sort_by` - **Type**: String: - **Description**: The field / column name to sort on. To reverse sort provide the field with a \"-\" sign. E.g. \"created_on\" for ascending order while \"-created_on\" in descending order. Defaults to \"id\". - `page_number` - **Type**: Positive Integer - **Description**: The page number for pagination. Defaults to 1. - `items_per_page` - **Type**: Positive Integer. - **Description**: The number of items per page for pagination. Defaults to 50.
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
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -23,13 +23,16 @@ try:
23
23
  except ImportError:
24
24
  from typing_extensions import Annotated
25
25
 
26
+ from pydantic import Field
27
+ from typing_extensions import Annotated
26
28
  from pydantic import StrictBool, StrictInt, StrictStr
27
29
 
28
- from typing import List, Optional
30
+ from typing import Optional
29
31
 
30
32
  from compute_api_client.models.compile_stage import CompileStage
31
33
  from compute_api_client.models.file import File
32
34
  from compute_api_client.models.file_in import FileIn
35
+ from compute_api_client.models.page_file import PageFile
33
36
 
34
37
  from compute_api_client.api_client import ApiClient
35
38
  from compute_api_client.api_response import ApiResponse
@@ -858,16 +861,16 @@ class FilesApi:
858
861
  @validate_call
859
862
  async def read_files_files_get(
860
863
  self,
861
- latest: Optional[StrictBool] = None,
862
- sort_by: Optional[StrictStr] = None,
863
- page_number: Optional[StrictInt] = None,
864
- items_per_page: Optional[StrictInt] = None,
865
864
  id: Optional[StrictInt] = None,
866
865
  commit_id: Optional[StrictInt] = None,
867
866
  content: Optional[StrictStr] = None,
868
867
  language_id: Optional[StrictInt] = None,
869
868
  compile_stage: Optional[CompileStage] = None,
870
869
  generated: Optional[StrictBool] = None,
870
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
871
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
872
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
873
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
871
874
  _request_timeout: Union[
872
875
  None,
873
876
  Annotated[StrictFloat, Field(gt=0)],
@@ -880,19 +883,11 @@ class FilesApi:
880
883
  _content_type: Optional[StrictStr] = None,
881
884
  _headers: Optional[Dict[StrictStr, Any]] = None,
882
885
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
883
- ) -> List[File]:
886
+ ) -> PageFile:
884
887
  """List files
885
888
 
886
889
  List files.
887
890
 
888
- :param latest:
889
- :type latest: bool
890
- :param sort_by:
891
- :type sort_by: str
892
- :param page_number:
893
- :type page_number: int
894
- :param items_per_page:
895
- :type items_per_page: int
896
891
  :param id:
897
892
  :type id: int
898
893
  :param commit_id:
@@ -905,6 +900,14 @@ class FilesApi:
905
900
  :type compile_stage: CompileStage
906
901
  :param generated:
907
902
  :type generated: bool
903
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
904
+ :type sort_by: str
905
+ :param latest: If True gets the most recently created object.
906
+ :type latest: bool
907
+ :param page: Page number
908
+ :type page: int
909
+ :param size: Page size
910
+ :type size: int
908
911
  :param _request_timeout: timeout setting for this request. If one
909
912
  number provided, it will be total request
910
913
  timeout. It can also be a pair (tuple) of
@@ -928,16 +931,16 @@ class FilesApi:
928
931
  """ # noqa: E501
929
932
 
930
933
  _param = self._read_files_files_get_serialize(
931
- latest=latest,
932
- sort_by=sort_by,
933
- page_number=page_number,
934
- items_per_page=items_per_page,
935
934
  id=id,
936
935
  commit_id=commit_id,
937
936
  content=content,
938
937
  language_id=language_id,
939
938
  compile_stage=compile_stage,
940
939
  generated=generated,
940
+ sort_by=sort_by,
941
+ latest=latest,
942
+ page=page,
943
+ size=size,
941
944
  _request_auth=_request_auth,
942
945
  _content_type=_content_type,
943
946
  _headers=_headers,
@@ -945,7 +948,7 @@ class FilesApi:
945
948
  )
946
949
 
947
950
  _response_types_map: Dict[str, Optional[str]] = {
948
- '200': "List[File]",
951
+ '200': "PageFile",
949
952
  '422': "HTTPValidationError"
950
953
 
951
954
  }
@@ -963,16 +966,16 @@ class FilesApi:
963
966
  @validate_call
964
967
  async def read_files_files_get_with_http_info(
965
968
  self,
966
- latest: Optional[StrictBool] = None,
967
- sort_by: Optional[StrictStr] = None,
968
- page_number: Optional[StrictInt] = None,
969
- items_per_page: Optional[StrictInt] = None,
970
969
  id: Optional[StrictInt] = None,
971
970
  commit_id: Optional[StrictInt] = None,
972
971
  content: Optional[StrictStr] = None,
973
972
  language_id: Optional[StrictInt] = None,
974
973
  compile_stage: Optional[CompileStage] = None,
975
974
  generated: Optional[StrictBool] = None,
975
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
976
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
977
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
978
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
976
979
  _request_timeout: Union[
977
980
  None,
978
981
  Annotated[StrictFloat, Field(gt=0)],
@@ -985,19 +988,11 @@ class FilesApi:
985
988
  _content_type: Optional[StrictStr] = None,
986
989
  _headers: Optional[Dict[StrictStr, Any]] = None,
987
990
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
988
- ) -> ApiResponse[List[File]]:
991
+ ) -> ApiResponse[PageFile]:
989
992
  """List files
990
993
 
991
994
  List files.
992
995
 
993
- :param latest:
994
- :type latest: bool
995
- :param sort_by:
996
- :type sort_by: str
997
- :param page_number:
998
- :type page_number: int
999
- :param items_per_page:
1000
- :type items_per_page: int
1001
996
  :param id:
1002
997
  :type id: int
1003
998
  :param commit_id:
@@ -1010,6 +1005,14 @@ class FilesApi:
1010
1005
  :type compile_stage: CompileStage
1011
1006
  :param generated:
1012
1007
  :type generated: bool
1008
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
1009
+ :type sort_by: str
1010
+ :param latest: If True gets the most recently created object.
1011
+ :type latest: bool
1012
+ :param page: Page number
1013
+ :type page: int
1014
+ :param size: Page size
1015
+ :type size: int
1013
1016
  :param _request_timeout: timeout setting for this request. If one
1014
1017
  number provided, it will be total request
1015
1018
  timeout. It can also be a pair (tuple) of
@@ -1033,16 +1036,16 @@ class FilesApi:
1033
1036
  """ # noqa: E501
1034
1037
 
1035
1038
  _param = self._read_files_files_get_serialize(
1036
- latest=latest,
1037
- sort_by=sort_by,
1038
- page_number=page_number,
1039
- items_per_page=items_per_page,
1040
1039
  id=id,
1041
1040
  commit_id=commit_id,
1042
1041
  content=content,
1043
1042
  language_id=language_id,
1044
1043
  compile_stage=compile_stage,
1045
1044
  generated=generated,
1045
+ sort_by=sort_by,
1046
+ latest=latest,
1047
+ page=page,
1048
+ size=size,
1046
1049
  _request_auth=_request_auth,
1047
1050
  _content_type=_content_type,
1048
1051
  _headers=_headers,
@@ -1050,7 +1053,7 @@ class FilesApi:
1050
1053
  )
1051
1054
 
1052
1055
  _response_types_map: Dict[str, Optional[str]] = {
1053
- '200': "List[File]",
1056
+ '200': "PageFile",
1054
1057
  '422': "HTTPValidationError"
1055
1058
 
1056
1059
  }
@@ -1068,16 +1071,16 @@ class FilesApi:
1068
1071
  @validate_call
1069
1072
  async def read_files_files_get_without_preload_content(
1070
1073
  self,
1071
- latest: Optional[StrictBool] = None,
1072
- sort_by: Optional[StrictStr] = None,
1073
- page_number: Optional[StrictInt] = None,
1074
- items_per_page: Optional[StrictInt] = None,
1075
1074
  id: Optional[StrictInt] = None,
1076
1075
  commit_id: Optional[StrictInt] = None,
1077
1076
  content: Optional[StrictStr] = None,
1078
1077
  language_id: Optional[StrictInt] = None,
1079
1078
  compile_stage: Optional[CompileStage] = None,
1080
1079
  generated: Optional[StrictBool] = None,
1080
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
1081
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
1082
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
1083
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
1081
1084
  _request_timeout: Union[
1082
1085
  None,
1083
1086
  Annotated[StrictFloat, Field(gt=0)],
@@ -1095,14 +1098,6 @@ class FilesApi:
1095
1098
 
1096
1099
  List files.
1097
1100
 
1098
- :param latest:
1099
- :type latest: bool
1100
- :param sort_by:
1101
- :type sort_by: str
1102
- :param page_number:
1103
- :type page_number: int
1104
- :param items_per_page:
1105
- :type items_per_page: int
1106
1101
  :param id:
1107
1102
  :type id: int
1108
1103
  :param commit_id:
@@ -1115,6 +1110,14 @@ class FilesApi:
1115
1110
  :type compile_stage: CompileStage
1116
1111
  :param generated:
1117
1112
  :type generated: bool
1113
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
1114
+ :type sort_by: str
1115
+ :param latest: If True gets the most recently created object.
1116
+ :type latest: bool
1117
+ :param page: Page number
1118
+ :type page: int
1119
+ :param size: Page size
1120
+ :type size: int
1118
1121
  :param _request_timeout: timeout setting for this request. If one
1119
1122
  number provided, it will be total request
1120
1123
  timeout. It can also be a pair (tuple) of
@@ -1138,16 +1141,16 @@ class FilesApi:
1138
1141
  """ # noqa: E501
1139
1142
 
1140
1143
  _param = self._read_files_files_get_serialize(
1141
- latest=latest,
1142
- sort_by=sort_by,
1143
- page_number=page_number,
1144
- items_per_page=items_per_page,
1145
1144
  id=id,
1146
1145
  commit_id=commit_id,
1147
1146
  content=content,
1148
1147
  language_id=language_id,
1149
1148
  compile_stage=compile_stage,
1150
1149
  generated=generated,
1150
+ sort_by=sort_by,
1151
+ latest=latest,
1152
+ page=page,
1153
+ size=size,
1151
1154
  _request_auth=_request_auth,
1152
1155
  _content_type=_content_type,
1153
1156
  _headers=_headers,
@@ -1155,7 +1158,7 @@ class FilesApi:
1155
1158
  )
1156
1159
 
1157
1160
  _response_types_map: Dict[str, Optional[str]] = {
1158
- '200': "List[File]",
1161
+ '200': "PageFile",
1159
1162
  '422': "HTTPValidationError"
1160
1163
 
1161
1164
  }
@@ -1168,16 +1171,16 @@ class FilesApi:
1168
1171
 
1169
1172
  def _read_files_files_get_serialize(
1170
1173
  self,
1171
- latest,
1172
- sort_by,
1173
- page_number,
1174
- items_per_page,
1175
1174
  id,
1176
1175
  commit_id,
1177
1176
  content,
1178
1177
  language_id,
1179
1178
  compile_stage,
1180
1179
  generated,
1180
+ sort_by,
1181
+ latest,
1182
+ page,
1183
+ size,
1181
1184
  _request_auth,
1182
1185
  _content_type,
1183
1186
  _headers,
@@ -1199,22 +1202,6 @@ class FilesApi:
1199
1202
 
1200
1203
  # process the path parameters
1201
1204
  # process the query parameters
1202
- if latest is not None:
1203
-
1204
- _query_params.append(('latest', latest))
1205
-
1206
- if sort_by is not None:
1207
-
1208
- _query_params.append(('sort_by', sort_by))
1209
-
1210
- if page_number is not None:
1211
-
1212
- _query_params.append(('page_number', page_number))
1213
-
1214
- if items_per_page is not None:
1215
-
1216
- _query_params.append(('items_per_page', items_per_page))
1217
-
1218
1205
  if id is not None:
1219
1206
 
1220
1207
  _query_params.append(('id', id))
@@ -1239,6 +1226,22 @@ class FilesApi:
1239
1226
 
1240
1227
  _query_params.append(('generated', generated))
1241
1228
 
1229
+ if sort_by is not None:
1230
+
1231
+ _query_params.append(('sort_by', sort_by))
1232
+
1233
+ if latest is not None:
1234
+
1235
+ _query_params.append(('latest', latest))
1236
+
1237
+ if page is not None:
1238
+
1239
+ _query_params.append(('page', page))
1240
+
1241
+ if size is not None:
1242
+
1243
+ _query_params.append(('size', size))
1244
+
1242
1245
  # process the header parameters
1243
1246
  # process the form parameters
1244
1247
  # process the body parameter
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Quantum Inspire 2
5
5
 
6
- **Sorting and Pagination of list endpoints** The api provides sorting and pagination for list endpoints. The following parameters can be passed as query parameters to get sorted and paginated list. - `latest` - **Type**: Boolean. - **Description**: Get the most recently created object. Defaults to False. - `sort_by` - **Type**: String: - **Description**: The field / column name to sort on. To reverse sort provide the field with a \"-\" sign. E.g. \"created_on\" for ascending order while \"-created_on\" in descending order. Defaults to \"id\". - `page_number` - **Type**: Positive Integer - **Description**: The page number for pagination. Defaults to 1. - `items_per_page` - **Type**: Positive Integer. - **Description**: The number of items per page for pagination. Defaults to 50.
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
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -0,0 +1,290 @@
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)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import io
16
+ import warnings
17
+
18
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
19
+ from typing import Dict, List, Optional, Tuple, Union, Any
20
+
21
+ try:
22
+ from typing import Annotated
23
+ except ImportError:
24
+ from typing_extensions import Annotated
25
+
26
+ from typing import Any
27
+
28
+
29
+ from compute_api_client.api_client import ApiClient
30
+ from compute_api_client.api_response import ApiResponse
31
+ from compute_api_client.rest import RESTResponseType
32
+
33
+
34
+ class HealthApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ async def healthz_healthz_get(
49
+ self,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> object:
63
+ """Report health
64
+
65
+ Health endpoint.
66
+
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._healthz_healthz_get_serialize(
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "object"
98
+
99
+ }
100
+ response_data = await self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ await response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ async def healthz_healthz_get_with_http_info(
113
+ self,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[object]:
127
+ """Report health
128
+
129
+ Health endpoint.
130
+
131
+ :param _request_timeout: timeout setting for this request. If one
132
+ number provided, it will be total request
133
+ timeout. It can also be a pair (tuple) of
134
+ (connection, read) timeouts.
135
+ :type _request_timeout: int, tuple(int, int), optional
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the
138
+ authentication in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :param _content_type: force content-type for the request.
141
+ :type _content_type: str, Optional
142
+ :param _headers: set to override the headers for a single
143
+ request; this effectively ignores the headers
144
+ in the spec for a single request.
145
+ :type _headers: dict, optional
146
+ :param _host_index: set to override the host_index for a single
147
+ request; this effectively ignores the host_index
148
+ in the spec for a single request.
149
+ :type _host_index: int, optional
150
+ :return: Returns the result object.
151
+ """ # noqa: E501
152
+
153
+ _param = self._healthz_healthz_get_serialize(
154
+ _request_auth=_request_auth,
155
+ _content_type=_content_type,
156
+ _headers=_headers,
157
+ _host_index=_host_index
158
+ )
159
+
160
+ _response_types_map: Dict[str, Optional[str]] = {
161
+ '200': "object"
162
+
163
+ }
164
+ response_data = await self.api_client.call_api(
165
+ *_param,
166
+ _request_timeout=_request_timeout
167
+ )
168
+ await response_data.read()
169
+ return self.api_client.response_deserialize(
170
+ response_data=response_data,
171
+ response_types_map=_response_types_map,
172
+ )
173
+
174
+
175
+ @validate_call
176
+ async def healthz_healthz_get_without_preload_content(
177
+ self,
178
+ _request_timeout: Union[
179
+ None,
180
+ Annotated[StrictFloat, Field(gt=0)],
181
+ Tuple[
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Annotated[StrictFloat, Field(gt=0)]
184
+ ]
185
+ ] = None,
186
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
187
+ _content_type: Optional[StrictStr] = None,
188
+ _headers: Optional[Dict[StrictStr, Any]] = None,
189
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
190
+ ) -> RESTResponseType:
191
+ """Report health
192
+
193
+ Health endpoint.
194
+
195
+ :param _request_timeout: timeout setting for this request. If one
196
+ number provided, it will be total request
197
+ timeout. It can also be a pair (tuple) of
198
+ (connection, read) timeouts.
199
+ :type _request_timeout: int, tuple(int, int), optional
200
+ :param _request_auth: set to override the auth_settings for an a single
201
+ request; this effectively ignores the
202
+ authentication in the spec for a single request.
203
+ :type _request_auth: dict, optional
204
+ :param _content_type: force content-type for the request.
205
+ :type _content_type: str, Optional
206
+ :param _headers: set to override the headers for a single
207
+ request; this effectively ignores the headers
208
+ in the spec for a single request.
209
+ :type _headers: dict, optional
210
+ :param _host_index: set to override the host_index for a single
211
+ request; this effectively ignores the host_index
212
+ in the spec for a single request.
213
+ :type _host_index: int, optional
214
+ :return: Returns the result object.
215
+ """ # noqa: E501
216
+
217
+ _param = self._healthz_healthz_get_serialize(
218
+ _request_auth=_request_auth,
219
+ _content_type=_content_type,
220
+ _headers=_headers,
221
+ _host_index=_host_index
222
+ )
223
+
224
+ _response_types_map: Dict[str, Optional[str]] = {
225
+ '200': "object"
226
+
227
+ }
228
+ response_data = await self.api_client.call_api(
229
+ *_param,
230
+ _request_timeout=_request_timeout
231
+ )
232
+ return response_data.response
233
+
234
+
235
+ def _healthz_healthz_get_serialize(
236
+ self,
237
+ _request_auth,
238
+ _content_type,
239
+ _headers,
240
+ _host_index,
241
+ ) -> Tuple:
242
+
243
+ _host = None
244
+
245
+ _collection_formats: Dict[str, str] = {
246
+
247
+ }
248
+
249
+ _path_params: Dict[str, str] = {}
250
+ _query_params: List[Tuple[str, str]] = []
251
+ _header_params: Dict[str, Optional[str]] = _headers or {}
252
+ _form_params: List[Tuple[str, str]] = []
253
+ _files: Dict[str, str] = {}
254
+ _body_params: Optional[bytes] = None
255
+
256
+ # process the path parameters
257
+ # process the query parameters
258
+ # process the header parameters
259
+ # process the form parameters
260
+ # process the body parameter
261
+
262
+
263
+ # set the HTTP header `Accept`
264
+ _header_params['Accept'] = self.api_client.select_header_accept(
265
+ [
266
+ 'application/json'
267
+ ]
268
+ )
269
+
270
+
271
+ # authentication setting
272
+ _auth_settings: List[str] = [
273
+ ]
274
+
275
+ return self.api_client.param_serialize(
276
+ method='GET',
277
+ resource_path='/healthz',
278
+ path_params=_path_params,
279
+ query_params=_query_params,
280
+ header_params=_header_params,
281
+ body=_body_params,
282
+ post_params=_form_params,
283
+ files=_files,
284
+ auth_settings=_auth_settings,
285
+ collection_formats=_collection_formats,
286
+ _host=_host,
287
+ _request_auth=_request_auth
288
+ )
289
+
290
+