harbor_swagger_client 1.0.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (432) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +1 -1
  3. data/README.md +119 -271
  4. data/docs/Access.md +10 -0
  5. data/docs/AdditionLink.md +9 -0
  6. data/docs/{QuotaRefObject.md → AdditionLinks.md} +1 -1
  7. data/docs/{EventType.md → Annotations.md} +1 -1
  8. data/docs/Artifact.md +25 -0
  9. data/docs/ArtifactApi.md +694 -0
  10. data/docs/AuditLog.md +13 -0
  11. data/docs/AuditlogApi.md +69 -0
  12. data/docs/AuthproxySetting.md +12 -0
  13. data/docs/CVEAllowlist.md +13 -0
  14. data/docs/{CVEWhitelistItem.md → CVEAllowlistItem.md} +1 -1
  15. data/docs/Error.md +9 -0
  16. data/docs/{Action.md → Errors.md} +2 -2
  17. data/docs/Execution.md +17 -0
  18. data/docs/{NotifyType.md → ExtraAttrs.md} +1 -1
  19. data/docs/GeneralInfo.md +4 -0
  20. data/docs/Icon.md +9 -0
  21. data/docs/IconApi.md +66 -0
  22. data/docs/Instance.md +19 -0
  23. data/docs/Label.md +8 -9
  24. data/docs/Metadata.md +13 -0
  25. data/docs/Metrics.md +14 -0
  26. data/docs/NativeReportSummary.md +15 -0
  27. data/docs/Permission.md +3 -2
  28. data/docs/PingApi.md +56 -0
  29. data/docs/Platform.md +12 -0
  30. data/docs/PreheatApi.md +1176 -0
  31. data/docs/PreheatPolicy.md +18 -0
  32. data/docs/Project.md +4 -3
  33. data/docs/ProjectApi.md +544 -0
  34. data/docs/ProjectDeletable.md +9 -0
  35. data/docs/ProjectMetadata.md +2 -1
  36. data/docs/ProjectReq.md +3 -2
  37. data/docs/ProjectSummary.md +3 -1
  38. data/docs/{ImmutableTagRule.md → ProviderUnderProject.md} +3 -3
  39. data/docs/Reference.md +13 -0
  40. data/docs/ReplicationApi.md +352 -0
  41. data/docs/ReplicationExecution.md +11 -11
  42. data/docs/ReplicationTask.md +10 -9
  43. data/docs/Repository.md +15 -0
  44. data/docs/RepositoryApi.md +256 -0
  45. data/docs/Robot.md +19 -0
  46. data/docs/RobotApi.md +363 -0
  47. data/docs/RobotCreate.md +14 -0
  48. data/docs/{RobotAccountCreate.md → RobotCreateV1.md} +2 -2
  49. data/docs/RobotCreated.md +12 -0
  50. data/docs/{Action1.md → RobotSec.md} +2 -2
  51. data/docs/Robotv1Api.md +317 -0
  52. data/docs/ScanApi.md +61 -27
  53. data/docs/{Labels.md → ScanOverview.md} +1 -1
  54. data/docs/StartReplicationExecution.md +8 -0
  55. data/docs/SysteminfoApi.md +152 -0
  56. data/docs/Tag.md +15 -0
  57. data/docs/Task.md +17 -0
  58. data/docs/VulnerabilitySummary.md +10 -0
  59. data/harbor_swagger_client-1.0.3.gem +0 -0
  60. data/harbor_swagger_client.gemspec +2 -1
  61. data/lib/harbor_swagger_client.rb +46 -106
  62. data/lib/harbor_swagger_client/api/artifact_api.rb +848 -0
  63. data/lib/harbor_swagger_client/api/auditlog_api.rb +91 -0
  64. data/lib/harbor_swagger_client/api/icon_api.rb +84 -0
  65. data/lib/harbor_swagger_client/api/ping_api.rb +71 -0
  66. data/lib/harbor_swagger_client/api/preheat_api.rb +1327 -0
  67. data/lib/harbor_swagger_client/api/project_api.rb +604 -0
  68. data/lib/harbor_swagger_client/api/replication_api.rb +380 -0
  69. data/lib/harbor_swagger_client/api/repository_api.rb +302 -0
  70. data/lib/harbor_swagger_client/api/robot_api.rb +406 -0
  71. data/lib/harbor_swagger_client/api/robotv1_api.rb +369 -0
  72. data/lib/harbor_swagger_client/api/scan_api.rb +89 -34
  73. data/lib/harbor_swagger_client/api/systeminfo_api.rb +167 -0
  74. data/lib/harbor_swagger_client/api_client.rb +6 -4
  75. data/lib/harbor_swagger_client/api_error.rb +1 -1
  76. data/lib/harbor_swagger_client/configuration.rb +4 -4
  77. data/lib/harbor_swagger_client/models/{robot_account_access.rb → access.rb} +20 -9
  78. data/lib/harbor_swagger_client/models/{namespace.rb → addition_link.rb} +19 -19
  79. data/lib/harbor_swagger_client/models/{quota_ref_object.rb → addition_links.rb} +4 -3
  80. data/lib/harbor_swagger_client/models/{labels.rb → annotations.rb} +4 -4
  81. data/lib/harbor_swagger_client/models/{chart_version.rb → artifact.rb} +133 -139
  82. data/lib/harbor_swagger_client/models/audit_log.rb +235 -0
  83. data/lib/harbor_swagger_client/models/{email_server_setting.rb → authproxy_setting.rb} +40 -49
  84. data/lib/harbor_swagger_client/models/{cve_whitelist.rb → cve_allowlist.rb} +32 -11
  85. data/lib/harbor_swagger_client/models/{cve_whitelist_item.rb → cve_allowlist_item.rb} +5 -4
  86. data/lib/harbor_swagger_client/models/{ldap_failed_import_users.rb → error.rb} +20 -18
  87. data/lib/harbor_swagger_client/models/{action_1.rb → errors.rb} +14 -10
  88. data/lib/harbor_swagger_client/models/{retention_execution.rb → execution.rb} +67 -31
  89. data/lib/harbor_swagger_client/models/{event_type.rb → extra_attrs.rb} +4 -4
  90. data/lib/harbor_swagger_client/models/general_info.rb +47 -6
  91. data/lib/harbor_swagger_client/models/{endpoint.rb → icon.rb} +19 -18
  92. data/lib/harbor_swagger_client/models/instance.rb +297 -0
  93. data/lib/harbor_swagger_client/models/label.rb +16 -25
  94. data/lib/harbor_swagger_client/models/{scanner.rb → metadata.rb} +49 -16
  95. data/lib/harbor_swagger_client/models/{webhook_job.rb → metrics.rb} +54 -64
  96. data/lib/harbor_swagger_client/models/{component_overview_entry.rb → native_report_summary.rb} +74 -13
  97. data/lib/harbor_swagger_client/models/permission.rb +29 -18
  98. data/lib/harbor_swagger_client/models/{retention_policy.rb → platform.rb} +42 -37
  99. data/lib/harbor_swagger_client/models/{webhook_policy.rb → preheat_policy.rb} +56 -48
  100. data/lib/harbor_swagger_client/models/project.rb +23 -12
  101. data/lib/harbor_swagger_client/models/{configurations_scan_all_policy.rb → project_deletable.rb} +19 -17
  102. data/lib/harbor_swagger_client/models/project_metadata.rb +21 -10
  103. data/lib/harbor_swagger_client/models/project_req.rb +34 -23
  104. data/lib/harbor_swagger_client/models/project_summary.rb +33 -13
  105. data/lib/harbor_swagger_client/models/project_summary_quota.rb +3 -2
  106. data/lib/harbor_swagger_client/models/{immutable_tag_rule.rb → provider_under_project.rb} +23 -22
  107. data/lib/harbor_swagger_client/models/{stats.rb → reference.rb} +52 -34
  108. data/lib/harbor_swagger_client/models/registry.rb +3 -2
  109. data/lib/harbor_swagger_client/models/registry_credential.rb +3 -2
  110. data/lib/harbor_swagger_client/models/replication_execution.rb +45 -44
  111. data/lib/harbor_swagger_client/models/replication_task.rb +43 -32
  112. data/lib/harbor_swagger_client/models/{robot_account.rb → repository.rb} +36 -36
  113. data/lib/harbor_swagger_client/models/resource_list.rb +3 -2
  114. data/lib/harbor_swagger_client/models/{replication_policy.rb → robot.rb} +62 -71
  115. data/lib/harbor_swagger_client/models/{put_registry.rb → robot_create.rb} +44 -41
  116. data/lib/harbor_swagger_client/models/{robot_account_create.rb → robot_create_v1.rb} +5 -4
  117. data/lib/harbor_swagger_client/models/{quota.rb → robot_created.rb} +30 -39
  118. data/lib/harbor_swagger_client/models/{input_secret.rb → robot_sec.rb} +6 -4
  119. data/lib/harbor_swagger_client/models/{notify_type.rb → scan_overview.rb} +5 -4
  120. data/lib/harbor_swagger_client/models/{action.rb → start_replication_execution.rb} +12 -10
  121. data/lib/harbor_swagger_client/models/storage.rb +3 -2
  122. data/lib/harbor_swagger_client/models/system_info.rb +3 -2
  123. data/lib/harbor_swagger_client/models/{retention_rule.rb → tag.rb} +55 -52
  124. data/lib/harbor_swagger_client/models/{retention_execution_task.rb → task.rb} +53 -52
  125. data/lib/harbor_swagger_client/models/{scanner_adapter_metadata.rb → vulnerability_summary.rb} +28 -26
  126. data/lib/harbor_swagger_client/version.rb +2 -2
  127. data/spec/api/artifact_api_spec.rb +209 -0
  128. data/spec/api/auditlog_api_spec.rb +50 -0
  129. data/spec/api/icon_api_spec.rb +48 -0
  130. data/spec/api/ping_api_spec.rb +46 -0
  131. data/spec/api/preheat_api_spec.rb +311 -0
  132. data/spec/api/project_api_spec.rb +161 -0
  133. data/spec/api/replication_api_spec.rb +116 -0
  134. data/spec/api/repository_api_spec.rb +94 -0
  135. data/spec/api/robot_api_spec.rb +117 -0
  136. data/spec/api/robotv1_api_spec.rb +108 -0
  137. data/spec/api/scan_api_spec.rb +20 -11
  138. data/spec/api/systeminfo_api_spec.rb +68 -0
  139. data/spec/api_client_spec.rb +18 -1
  140. data/spec/configuration_spec.rb +1 -1
  141. data/spec/models/{search_spec.rb → access_spec.rb} +10 -10
  142. data/spec/models/{password_spec.rb → addition_link_spec.rb} +9 -9
  143. data/spec/models/{quota_ref_object_spec.rb → addition_links_spec.rb} +7 -7
  144. data/spec/models/{labels_spec.rb → annotations_spec.rb} +7 -7
  145. data/spec/models/{chart_version_spec.rb → artifact_spec.rb} +39 -21
  146. data/spec/models/{search_repository_spec.rb → audit_log_spec.rb} +13 -13
  147. data/spec/models/authproxy_setting_spec.rb +65 -0
  148. data/spec/models/{cve_whitelist_item_spec.rb → cve_allowlist_item_spec.rb} +7 -7
  149. data/spec/models/{quota_spec.rb → cve_allowlist_spec.rb} +10 -10
  150. data/spec/models/{endpoint_spec.rb → error_spec.rb} +9 -9
  151. data/spec/models/{action_spec.rb → errors_spec.rb} +8 -8
  152. data/spec/models/{gc_result_spec.rb → execution_spec.rb} +21 -15
  153. data/spec/models/{event_type_spec.rb → extra_attrs_spec.rb} +7 -7
  154. data/spec/models/general_info_spec.rb +25 -1
  155. data/spec/models/{namespace_spec.rb → icon_spec.rb} +9 -9
  156. data/spec/models/{chart_metadata_spec.rb → instance_spec.rb} +23 -17
  157. data/spec/models/label_spec.rb +1 -7
  158. data/spec/models/{email_server_setting_spec.rb → metadata_spec.rb} +13 -13
  159. data/spec/models/{ping_registry_spec.rb → metrics_spec.rb} +14 -14
  160. data/spec/models/{ldap_conf_spec.rb → native_report_summary_spec.rb} +15 -15
  161. data/spec/models/permission_spec.rb +9 -3
  162. data/spec/models/{registry_info_spec.rb → platform_spec.rb} +17 -11
  163. data/spec/models/{webhook_policy_spec.rb → preheat_policy_spec.rb} +19 -13
  164. data/spec/models/{bool_config_item_spec.rb → project_deletable_spec.rb} +9 -9
  165. data/spec/models/project_metadata_spec.rb +8 -2
  166. data/spec/models/project_req_spec.rb +10 -4
  167. data/spec/models/project_spec.rb +8 -2
  168. data/spec/models/project_summary_quota_spec.rb +1 -1
  169. data/spec/models/project_summary_spec.rb +14 -2
  170. data/spec/models/{immutable_tag_rule_spec.rb → provider_under_project_spec.rb} +10 -10
  171. data/spec/models/{statistic_map_spec.rb → reference_spec.rb} +13 -13
  172. data/spec/models/registry_credential_spec.rb +1 -1
  173. data/spec/models/registry_spec.rb +1 -1
  174. data/spec/models/replication_execution_spec.rb +10 -10
  175. data/spec/models/replication_task_spec.rb +12 -6
  176. data/spec/models/{robot_account_spec.rb → repository_spec.rb} +12 -12
  177. data/spec/models/resource_list_spec.rb +1 -1
  178. data/spec/models/{put_registry_spec.rb → robot_create_spec.rb} +12 -12
  179. data/spec/models/{robot_account_create_spec.rb → robot_create_v1_spec.rb} +7 -7
  180. data/spec/models/{retention_policy_spec.rb → robot_created_spec.rb} +11 -11
  181. data/spec/models/{input_secret_spec.rb → robot_sec_spec.rb} +7 -7
  182. data/spec/models/{replication_policy_spec.rb → robot_spec.rb} +14 -20
  183. data/spec/models/{notify_type_spec.rb → scan_overview_spec.rb} +7 -7
  184. data/spec/models/{unauthorized_chart_api_error_spec.rb → start_replication_execution_spec.rb} +8 -8
  185. data/spec/models/storage_spec.rb +1 -1
  186. data/spec/models/system_info_spec.rb +1 -1
  187. data/spec/models/{webhook_job_spec.rb → tag_spec.rb} +14 -14
  188. data/spec/models/{retention_execution_task_spec.rb → task_spec.rb} +15 -21
  189. data/spec/models/{project_member_spec.rb → vulnerability_summary_spec.rb} +10 -10
  190. data/spec/spec_helper.rb +1 -1
  191. metadata +204 -423
  192. data/docs/AdminJobSchedule.md +0 -9
  193. data/docs/AdminJobScheduleObj.md +0 -9
  194. data/docs/BadRequestFormatedError.md +0 -8
  195. data/docs/BoolConfigItem.md +0 -9
  196. data/docs/CVEWhitelist.md +0 -11
  197. data/docs/ChartAPIError.md +0 -8
  198. data/docs/ChartMetadata.md +0 -18
  199. data/docs/ChartRepositoryApi.md +0 -191
  200. data/docs/ChartVersion.md +0 -22
  201. data/docs/ComponentHealthStatus.md +0 -10
  202. data/docs/ComponentOverviewEntry.md +0 -9
  203. data/docs/Configurations.md +0 -42
  204. data/docs/ConfigurationsResponse.md +0 -41
  205. data/docs/ConfigurationsScanAllPolicy.md +0 -9
  206. data/docs/ConfigurationsScanAllPolicyParameter.md +0 -8
  207. data/docs/ConflictFormatedError.md +0 -8
  208. data/docs/EmailServerSetting.md +0 -13
  209. data/docs/Endpoint.md +0 -9
  210. data/docs/FilterStyle.md +0 -10
  211. data/docs/ForbiddenChartAPIError.md +0 -8
  212. data/docs/GCResult.md +0 -16
  213. data/docs/InputSecret.md +0 -8
  214. data/docs/InsufficientStorageChartAPIError.md +0 -8
  215. data/docs/IntegerConfigItem.md +0 -9
  216. data/docs/InternalChartAPIError.md +0 -8
  217. data/docs/IsDefault.md +0 -8
  218. data/docs/LabelApi.md +0 -191
  219. data/docs/LdapConf.md +0 -15
  220. data/docs/LdapFailedImportUsers.md +0 -9
  221. data/docs/LdapImportUsers.md +0 -8
  222. data/docs/LdapUsers.md +0 -10
  223. data/docs/Namespace.md +0 -9
  224. data/docs/NotFoundChartAPIError.md +0 -8
  225. data/docs/OverallHealthStatus.md +0 -9
  226. data/docs/Password.md +0 -9
  227. data/docs/PingRegistry.md +0 -14
  228. data/docs/ProductsApi.md +0 -6768
  229. data/docs/ProjectMember.md +0 -10
  230. data/docs/ProjectMemberEntity.md +0 -14
  231. data/docs/ProjectScanner.md +0 -8
  232. data/docs/PutRegistry.md +0 -14
  233. data/docs/Quota.md +0 -13
  234. data/docs/QuotaApi.md +0 -118
  235. data/docs/QuotaSwitcher.md +0 -8
  236. data/docs/QuotaUpdateReq.md +0 -8
  237. data/docs/RegistryInfo.md +0 -11
  238. data/docs/ReplicationFilter.md +0 -9
  239. data/docs/ReplicationPolicy.md +0 -20
  240. data/docs/ReplicationTrigger.md +0 -9
  241. data/docs/RetentionApi.md +0 -449
  242. data/docs/RetentionExecution.md +0 -14
  243. data/docs/RetentionExecutionTask.md +0 -18
  244. data/docs/RetentionMetadata.md +0 -10
  245. data/docs/RetentionPolicy.md +0 -12
  246. data/docs/RetentionPolicyScope.md +0 -9
  247. data/docs/RetentionRule.md +0 -15
  248. data/docs/RetentionRuleMetadata.md +0 -11
  249. data/docs/RetentionRuleParamMetadata.md +0 -10
  250. data/docs/RetentionRuleTrigger.md +0 -10
  251. data/docs/RetentionSelector.md +0 -11
  252. data/docs/RetentionSelectorMetadata.md +0 -10
  253. data/docs/RobotAccount.md +0 -15
  254. data/docs/RobotAccountAccess.md +0 -9
  255. data/docs/RobotAccountApi.md +0 -291
  256. data/docs/RobotAccountPostRep.md +0 -9
  257. data/docs/RobotAccountUpdate.md +0 -8
  258. data/docs/Role.md +0 -11
  259. data/docs/RoleParam.md +0 -9
  260. data/docs/RoleRequest.md +0 -8
  261. data/docs/Scanner.md +0 -10
  262. data/docs/ScannerAdapterMetadata.md +0 -10
  263. data/docs/ScannerCapability.md +0 -9
  264. data/docs/ScannerRegistration.md +0 -21
  265. data/docs/ScannerRegistrationReq.md +0 -15
  266. data/docs/ScannerRegistrationSettings.md +0 -11
  267. data/docs/ScannersApi.md +0 -600
  268. data/docs/Search.md +0 -10
  269. data/docs/SearchRepository.md +0 -13
  270. data/docs/SearchResult.md +0 -10
  271. data/docs/StatisticMap.md +0 -13
  272. data/docs/Stats.md +0 -11
  273. data/docs/StringConfigItem.md +0 -9
  274. data/docs/SupportedWebhookEventTypes.md +0 -9
  275. data/docs/SysAdminFlag.md +0 -8
  276. data/docs/SystemApi.md +0 -163
  277. data/docs/TriggerSettings.md +0 -8
  278. data/docs/UnauthorizedChartAPIError.md +0 -8
  279. data/docs/User.md +0 -22
  280. data/docs/UserEntity.md +0 -9
  281. data/docs/UserGroup.md +0 -11
  282. data/docs/UserProfile.md +0 -10
  283. data/docs/UserSearch.md +0 -9
  284. data/docs/WebhookJob.md +0 -15
  285. data/docs/WebhookLastTrigger.md +0 -11
  286. data/docs/WebhookPolicy.md +0 -17
  287. data/docs/WebhookTargetObject.md +0 -11
  288. data/lib/harbor_swagger_client/api/chart_repository_api.rb +0 -230
  289. data/lib/harbor_swagger_client/api/label_api.rb +0 -230
  290. data/lib/harbor_swagger_client/api/products_api.rb +0 -6879
  291. data/lib/harbor_swagger_client/api/quota_api.rb +0 -136
  292. data/lib/harbor_swagger_client/api/retention_api.rb +0 -482
  293. data/lib/harbor_swagger_client/api/robot_account_api.rb +0 -321
  294. data/lib/harbor_swagger_client/api/scanners_api.rb +0 -624
  295. data/lib/harbor_swagger_client/api/system_api.rb +0 -173
  296. data/lib/harbor_swagger_client/models/admin_job_schedule.rb +0 -195
  297. data/lib/harbor_swagger_client/models/admin_job_schedule_obj.rb +0 -194
  298. data/lib/harbor_swagger_client/models/bad_request_formated_error.rb +0 -190
  299. data/lib/harbor_swagger_client/models/bool_config_item.rb +0 -194
  300. data/lib/harbor_swagger_client/models/chart_api_error.rb +0 -190
  301. data/lib/harbor_swagger_client/models/chart_metadata.rb +0 -319
  302. data/lib/harbor_swagger_client/models/component_health_status.rb +0 -205
  303. data/lib/harbor_swagger_client/models/configurations.rb +0 -523
  304. data/lib/harbor_swagger_client/models/configurations_response.rb +0 -513
  305. data/lib/harbor_swagger_client/models/configurations_scan_all_policy_parameter.rb +0 -185
  306. data/lib/harbor_swagger_client/models/conflict_formated_error.rb +0 -190
  307. data/lib/harbor_swagger_client/models/filter_style.rb +0 -207
  308. data/lib/harbor_swagger_client/models/forbidden_chart_api_error.rb +0 -190
  309. data/lib/harbor_swagger_client/models/gc_result.rb +0 -263
  310. data/lib/harbor_swagger_client/models/insufficient_storage_chart_api_error.rb +0 -190
  311. data/lib/harbor_swagger_client/models/integer_config_item.rb +0 -194
  312. data/lib/harbor_swagger_client/models/internal_chart_api_error.rb +0 -190
  313. data/lib/harbor_swagger_client/models/is_default.rb +0 -184
  314. data/lib/harbor_swagger_client/models/ldap_conf.rb +0 -254
  315. data/lib/harbor_swagger_client/models/ldap_import_users.rb +0 -186
  316. data/lib/harbor_swagger_client/models/ldap_users.rb +0 -204
  317. data/lib/harbor_swagger_client/models/not_found_chart_api_error.rb +0 -190
  318. data/lib/harbor_swagger_client/models/overall_health_status.rb +0 -196
  319. data/lib/harbor_swagger_client/models/password.rb +0 -194
  320. data/lib/harbor_swagger_client/models/ping_registry.rb +0 -244
  321. data/lib/harbor_swagger_client/models/project_member.rb +0 -202
  322. data/lib/harbor_swagger_client/models/project_member_entity.rb +0 -244
  323. data/lib/harbor_swagger_client/models/project_scanner.rb +0 -184
  324. data/lib/harbor_swagger_client/models/quota_switcher.rb +0 -184
  325. data/lib/harbor_swagger_client/models/quota_update_req.rb +0 -184
  326. data/lib/harbor_swagger_client/models/registry_info.rb +0 -219
  327. data/lib/harbor_swagger_client/models/replication_filter.rb +0 -194
  328. data/lib/harbor_swagger_client/models/replication_trigger.rb +0 -193
  329. data/lib/harbor_swagger_client/models/retention_metadata.rb +0 -211
  330. data/lib/harbor_swagger_client/models/retention_policy_scope.rb +0 -192
  331. data/lib/harbor_swagger_client/models/retention_rule_metadata.rb +0 -217
  332. data/lib/harbor_swagger_client/models/retention_rule_param_metadata.rb +0 -202
  333. data/lib/harbor_swagger_client/models/retention_rule_trigger.rb +0 -201
  334. data/lib/harbor_swagger_client/models/retention_selector.rb +0 -210
  335. data/lib/harbor_swagger_client/models/retention_selector_metadata.rb +0 -204
  336. data/lib/harbor_swagger_client/models/robot_account_post_rep.rb +0 -194
  337. data/lib/harbor_swagger_client/models/robot_account_update.rb +0 -184
  338. data/lib/harbor_swagger_client/models/role.rb +0 -213
  339. data/lib/harbor_swagger_client/models/role_param.rb +0 -196
  340. data/lib/harbor_swagger_client/models/role_request.rb +0 -184
  341. data/lib/harbor_swagger_client/models/scanner_capability.rb +0 -196
  342. data/lib/harbor_swagger_client/models/scanner_registration.rb +0 -327
  343. data/lib/harbor_swagger_client/models/scanner_registration_req.rb +0 -262
  344. data/lib/harbor_swagger_client/models/scanner_registration_settings.rb +0 -216
  345. data/lib/harbor_swagger_client/models/search.rb +0 -210
  346. data/lib/harbor_swagger_client/models/search_repository.rb +0 -234
  347. data/lib/harbor_swagger_client/models/search_result.rb +0 -204
  348. data/lib/harbor_swagger_client/models/statistic_map.rb +0 -234
  349. data/lib/harbor_swagger_client/models/string_config_item.rb +0 -194
  350. data/lib/harbor_swagger_client/models/supported_webhook_event_types.rb +0 -197
  351. data/lib/harbor_swagger_client/models/sys_admin_flag.rb +0 -184
  352. data/lib/harbor_swagger_client/models/trigger_settings.rb +0 -184
  353. data/lib/harbor_swagger_client/models/unauthorized_chart_api_error.rb +0 -190
  354. data/lib/harbor_swagger_client/models/user.rb +0 -311
  355. data/lib/harbor_swagger_client/models/user_entity.rb +0 -194
  356. data/lib/harbor_swagger_client/models/user_group.rb +0 -214
  357. data/lib/harbor_swagger_client/models/user_profile.rb +0 -204
  358. data/lib/harbor_swagger_client/models/user_search.rb +0 -193
  359. data/lib/harbor_swagger_client/models/webhook_last_trigger.rb +0 -215
  360. data/lib/harbor_swagger_client/models/webhook_target_object.rb +0 -215
  361. data/spec/api/chart_repository_api_spec.rb +0 -79
  362. data/spec/api/label_api_spec.rb +0 -79
  363. data/spec/api/products_api_spec.rb +0 -1581
  364. data/spec/api/quota_api_spec.rb +0 -60
  365. data/spec/api/retention_api_spec.rb +0 -136
  366. data/spec/api/robot_account_api_spec.rb +0 -100
  367. data/spec/api/scanners_api_spec.rb +0 -169
  368. data/spec/api/system_api_spec.rb +0 -70
  369. data/spec/models/action_1_spec.rb +0 -41
  370. data/spec/models/admin_job_schedule_obj_spec.rb +0 -47
  371. data/spec/models/admin_job_schedule_spec.rb +0 -47
  372. data/spec/models/bad_request_formated_error_spec.rb +0 -41
  373. data/spec/models/chart_api_error_spec.rb +0 -41
  374. data/spec/models/component_health_status_spec.rb +0 -53
  375. data/spec/models/component_overview_entry_spec.rb +0 -47
  376. data/spec/models/configurations_response_spec.rb +0 -239
  377. data/spec/models/configurations_scan_all_policy_parameter_spec.rb +0 -41
  378. data/spec/models/configurations_scan_all_policy_spec.rb +0 -47
  379. data/spec/models/configurations_spec.rb +0 -245
  380. data/spec/models/conflict_formated_error_spec.rb +0 -41
  381. data/spec/models/cve_whitelist_spec.rb +0 -59
  382. data/spec/models/filter_style_spec.rb +0 -53
  383. data/spec/models/forbidden_chart_api_error_spec.rb +0 -41
  384. data/spec/models/insufficient_storage_chart_api_error_spec.rb +0 -41
  385. data/spec/models/integer_config_item_spec.rb +0 -47
  386. data/spec/models/internal_chart_api_error_spec.rb +0 -41
  387. data/spec/models/is_default_spec.rb +0 -41
  388. data/spec/models/ldap_failed_import_users_spec.rb +0 -47
  389. data/spec/models/ldap_import_users_spec.rb +0 -41
  390. data/spec/models/ldap_users_spec.rb +0 -53
  391. data/spec/models/not_found_chart_api_error_spec.rb +0 -41
  392. data/spec/models/overall_health_status_spec.rb +0 -47
  393. data/spec/models/project_member_entity_spec.rb +0 -77
  394. data/spec/models/project_scanner_spec.rb +0 -41
  395. data/spec/models/quota_switcher_spec.rb +0 -41
  396. data/spec/models/quota_update_req_spec.rb +0 -41
  397. data/spec/models/replication_filter_spec.rb +0 -47
  398. data/spec/models/replication_trigger_spec.rb +0 -47
  399. data/spec/models/retention_execution_spec.rb +0 -77
  400. data/spec/models/retention_metadata_spec.rb +0 -53
  401. data/spec/models/retention_policy_scope_spec.rb +0 -47
  402. data/spec/models/retention_rule_metadata_spec.rb +0 -59
  403. data/spec/models/retention_rule_param_metadata_spec.rb +0 -53
  404. data/spec/models/retention_rule_spec.rb +0 -83
  405. data/spec/models/retention_rule_trigger_spec.rb +0 -53
  406. data/spec/models/retention_selector_metadata_spec.rb +0 -53
  407. data/spec/models/retention_selector_spec.rb +0 -59
  408. data/spec/models/robot_account_access_spec.rb +0 -47
  409. data/spec/models/robot_account_post_rep_spec.rb +0 -47
  410. data/spec/models/robot_account_update_spec.rb +0 -41
  411. data/spec/models/role_param_spec.rb +0 -47
  412. data/spec/models/role_request_spec.rb +0 -41
  413. data/spec/models/role_spec.rb +0 -59
  414. data/spec/models/scanner_adapter_metadata_spec.rb +0 -53
  415. data/spec/models/scanner_capability_spec.rb +0 -47
  416. data/spec/models/scanner_registration_req_spec.rb +0 -83
  417. data/spec/models/scanner_registration_settings_spec.rb +0 -59
  418. data/spec/models/scanner_registration_spec.rb +0 -119
  419. data/spec/models/scanner_spec.rb +0 -53
  420. data/spec/models/search_result_spec.rb +0 -53
  421. data/spec/models/stats_spec.rb +0 -59
  422. data/spec/models/string_config_item_spec.rb +0 -47
  423. data/spec/models/supported_webhook_event_types_spec.rb +0 -47
  424. data/spec/models/sys_admin_flag_spec.rb +0 -41
  425. data/spec/models/trigger_settings_spec.rb +0 -41
  426. data/spec/models/user_entity_spec.rb +0 -47
  427. data/spec/models/user_group_spec.rb +0 -59
  428. data/spec/models/user_profile_spec.rb +0 -53
  429. data/spec/models/user_search_spec.rb +0 -47
  430. data/spec/models/user_spec.rb +0 -125
  431. data/spec/models/webhook_last_trigger_spec.rb +0 -59
  432. data/spec/models/webhook_target_object_spec.rb +0 -59
@@ -0,0 +1,91 @@
1
+ =begin
2
+ #Harbor API
3
+
4
+ #These APIs provide services for manipulating Harbor project.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.17
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module SwaggerClient
16
+ class AuditlogApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get recent logs of the projects which the user is a member of
23
+ # This endpoint let user see the recent operation logs of the projects which he is member of
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :x_request_id An unique ID for the request
26
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max]
27
+ # @option opts [Integer] :page The page number (default to 1)
28
+ # @option opts [Integer] :page_size The size of per page (default to 10)
29
+ # @return [Array<AuditLog>]
30
+ def list_audit_logs(opts = {})
31
+ data, _status_code, _headers = list_audit_logs_with_http_info(opts)
32
+ data
33
+ end
34
+
35
+ # Get recent logs of the projects which the user is a member of
36
+ # This endpoint let user see the recent operation logs of the projects which he is member of
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :x_request_id An unique ID for the request
39
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
40
+ # @option opts [Integer] :page The page number
41
+ # @option opts [Integer] :page_size The size of per page
42
+ # @return [Array<(Array<AuditLog>, Fixnum, Hash)>] Array<AuditLog> data, response status code and response headers
43
+ def list_audit_logs_with_http_info(opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: AuditlogApi.list_audit_logs ...'
46
+ end
47
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling AuditlogApi.list_audit_logs, the character length must be great than or equal to 1.'
49
+ end
50
+
51
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
52
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AuditlogApi.list_audit_logs, must be smaller than or equal to 100.'
53
+ end
54
+
55
+ # resource path
56
+ local_var_path = '/audit-logs'
57
+
58
+ # query parameters
59
+ query_params = {}
60
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
61
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
62
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
63
+
64
+ # header parameters
65
+ header_params = {}
66
+ # HTTP header 'Accept' (if needed)
67
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
68
+ # HTTP header 'Content-Type'
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
70
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = ['basic']
78
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'Array<AuditLog>')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: AuditlogApi#list_audit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,84 @@
1
+ =begin
2
+ #Harbor API
3
+
4
+ #These APIs provide services for manipulating Harbor project.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.17
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module SwaggerClient
16
+ class IconApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get artifact icon
23
+ # Get the artifact icon with the specified digest. As the original icon image is resized and encoded before returning, the parameter \"digest\" in the path doesn't match the hash of the returned content
24
+ # @param digest The digest of the resource
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :x_request_id An unique ID for the request
27
+ # @return [Icon]
28
+ def get_icon(digest, opts = {})
29
+ data, _status_code, _headers = get_icon_with_http_info(digest, opts)
30
+ data
31
+ end
32
+
33
+ # Get artifact icon
34
+ # Get the artifact icon with the specified digest. As the original icon image is resized and encoded before returning, the parameter \&quot;digest\&quot; in the path doesn&#39;t match the hash of the returned content
35
+ # @param digest The digest of the resource
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :x_request_id An unique ID for the request
38
+ # @return [Array<(Icon, Fixnum, Hash)>] Icon data, response status code and response headers
39
+ def get_icon_with_http_info(digest, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: IconApi.get_icon ...'
42
+ end
43
+ # verify the required parameter 'digest' is set
44
+ if @api_client.config.client_side_validation && digest.nil?
45
+ fail ArgumentError, "Missing the required parameter 'digest' when calling IconApi.get_icon"
46
+ end
47
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling IconApi.get_icon, the character length must be great than or equal to 1.'
49
+ end
50
+
51
+ # resource path
52
+ local_var_path = '/icons/{digest}'.sub('{' + 'digest' + '}', digest.to_s)
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = nil
70
+ auth_names = ['basic']
71
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => 'Icon')
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: IconApi#get_icon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,71 @@
1
+ =begin
2
+ #Harbor API
3
+
4
+ #These APIs provide services for manipulating Harbor project.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.17
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module SwaggerClient
16
+ class PingApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Ping Harbor to check if it's alive.
23
+ # This API simply replies a pong to indicate the process to handle API is up, disregarding the health status of dependent components.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [String]
26
+ def ping_get(opts = {})
27
+ data, _status_code, _headers = ping_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Ping Harbor to check if it&#39;s alive.
32
+ # This API simply replies a pong to indicate the process to handle API is up, disregarding the health status of dependent components.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
35
+ def ping_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: PingApi.ping_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/ping'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
+
52
+ # form parameters
53
+ form_params = {}
54
+
55
+ # http body (model)
56
+ post_body = nil
57
+ auth_names = ['basic']
58
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => 'String')
65
+ if @api_client.config.debugging
66
+ @api_client.config.logger.debug "API called: PingApi#ping_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,1327 @@
1
+ =begin
2
+ #Harbor API
3
+
4
+ #These APIs provide services for manipulating Harbor project.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.17
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module SwaggerClient
16
+ class PreheatApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create p2p provider instances
23
+ # Create p2p provider instances
24
+ # @param instance The JSON object of instance.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :x_request_id An unique ID for the request
27
+ # @return [nil]
28
+ def create_instance(instance, opts = {})
29
+ create_instance_with_http_info(instance, opts)
30
+ nil
31
+ end
32
+
33
+ # Create p2p provider instances
34
+ # Create p2p provider instances
35
+ # @param instance The JSON object of instance.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :x_request_id An unique ID for the request
38
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
39
+ def create_instance_with_http_info(instance, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PreheatApi.create_instance ...'
42
+ end
43
+ # verify the required parameter 'instance' is set
44
+ if @api_client.config.client_side_validation && instance.nil?
45
+ fail ArgumentError, "Missing the required parameter 'instance' when calling PreheatApi.create_instance"
46
+ end
47
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.create_instance, the character length must be great than or equal to 1.'
49
+ end
50
+
51
+ # resource path
52
+ local_var_path = '/p2p/preheat/instances'
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = @api_client.object_to_http_body(instance)
70
+ auth_names = ['basic']
71
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: PreheatApi#create_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+ # Create a preheat policy under a project
83
+ # Create a preheat policy under a project
84
+ # @param project_name The name of the project
85
+ # @param policy The policy schema info
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [String] :x_request_id An unique ID for the request
88
+ # @return [nil]
89
+ def create_policy(project_name, policy, opts = {})
90
+ create_policy_with_http_info(project_name, policy, opts)
91
+ nil
92
+ end
93
+
94
+ # Create a preheat policy under a project
95
+ # Create a preheat policy under a project
96
+ # @param project_name The name of the project
97
+ # @param policy The policy schema info
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [String] :x_request_id An unique ID for the request
100
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
101
+ def create_policy_with_http_info(project_name, policy, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: PreheatApi.create_policy ...'
104
+ end
105
+ # verify the required parameter 'project_name' is set
106
+ if @api_client.config.client_side_validation && project_name.nil?
107
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.create_policy"
108
+ end
109
+ # verify the required parameter 'policy' is set
110
+ if @api_client.config.client_side_validation && policy.nil?
111
+ fail ArgumentError, "Missing the required parameter 'policy' when calling PreheatApi.create_policy"
112
+ end
113
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
114
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.create_policy, the character length must be great than or equal to 1.'
115
+ end
116
+
117
+ # resource path
118
+ local_var_path = '/projects/{project_name}/preheat/policies'.sub('{' + 'project_name' + '}', project_name.to_s)
119
+
120
+ # query parameters
121
+ query_params = {}
122
+
123
+ # header parameters
124
+ header_params = {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
130
+
131
+ # form parameters
132
+ form_params = {}
133
+
134
+ # http body (model)
135
+ post_body = @api_client.object_to_http_body(policy)
136
+ auth_names = ['basic']
137
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: PreheatApi#create_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+ # Delete the specified P2P provider instance
149
+ # Delete the specified P2P provider instance
150
+ # @param preheat_instance_name Instance Name
151
+ # @param [Hash] opts the optional parameters
152
+ # @option opts [String] :x_request_id An unique ID for the request
153
+ # @return [nil]
154
+ def delete_instance(preheat_instance_name, opts = {})
155
+ delete_instance_with_http_info(preheat_instance_name, opts)
156
+ nil
157
+ end
158
+
159
+ # Delete the specified P2P provider instance
160
+ # Delete the specified P2P provider instance
161
+ # @param preheat_instance_name Instance Name
162
+ # @param [Hash] opts the optional parameters
163
+ # @option opts [String] :x_request_id An unique ID for the request
164
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
165
+ def delete_instance_with_http_info(preheat_instance_name, opts = {})
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug 'Calling API: PreheatApi.delete_instance ...'
168
+ end
169
+ # verify the required parameter 'preheat_instance_name' is set
170
+ if @api_client.config.client_side_validation && preheat_instance_name.nil?
171
+ fail ArgumentError, "Missing the required parameter 'preheat_instance_name' when calling PreheatApi.delete_instance"
172
+ end
173
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
174
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.delete_instance, the character length must be great than or equal to 1.'
175
+ end
176
+
177
+ # resource path
178
+ local_var_path = '/p2p/preheat/instances/{preheat_instance_name}'.sub('{' + 'preheat_instance_name' + '}', preheat_instance_name.to_s)
179
+
180
+ # query parameters
181
+ query_params = {}
182
+
183
+ # header parameters
184
+ header_params = {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
187
+ # HTTP header 'Content-Type'
188
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
189
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
190
+
191
+ # form parameters
192
+ form_params = {}
193
+
194
+ # http body (model)
195
+ post_body = nil
196
+ auth_names = ['basic']
197
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names)
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug "API called: PreheatApi#delete_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
+ end
206
+ return data, status_code, headers
207
+ end
208
+ # Delete a preheat policy
209
+ # Delete a preheat policy
210
+ # @param project_name The name of the project
211
+ # @param preheat_policy_name Preheat Policy Name
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [String] :x_request_id An unique ID for the request
214
+ # @return [nil]
215
+ def delete_policy(project_name, preheat_policy_name, opts = {})
216
+ delete_policy_with_http_info(project_name, preheat_policy_name, opts)
217
+ nil
218
+ end
219
+
220
+ # Delete a preheat policy
221
+ # Delete a preheat policy
222
+ # @param project_name The name of the project
223
+ # @param preheat_policy_name Preheat Policy Name
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [String] :x_request_id An unique ID for the request
226
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
227
+ def delete_policy_with_http_info(project_name, preheat_policy_name, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: PreheatApi.delete_policy ...'
230
+ end
231
+ # verify the required parameter 'project_name' is set
232
+ if @api_client.config.client_side_validation && project_name.nil?
233
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.delete_policy"
234
+ end
235
+ # verify the required parameter 'preheat_policy_name' is set
236
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
237
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.delete_policy"
238
+ end
239
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
240
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.delete_policy, the character length must be great than or equal to 1.'
241
+ end
242
+
243
+ # resource path
244
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s)
245
+
246
+ # query parameters
247
+ query_params = {}
248
+
249
+ # header parameters
250
+ header_params = {}
251
+ # HTTP header 'Accept' (if needed)
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
253
+ # HTTP header 'Content-Type'
254
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
255
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
256
+
257
+ # form parameters
258
+ form_params = {}
259
+
260
+ # http body (model)
261
+ post_body = nil
262
+ auth_names = ['basic']
263
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
264
+ :header_params => header_params,
265
+ :query_params => query_params,
266
+ :form_params => form_params,
267
+ :body => post_body,
268
+ :auth_names => auth_names)
269
+ if @api_client.config.debugging
270
+ @api_client.config.logger.debug "API called: PreheatApi#delete_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
271
+ end
272
+ return data, status_code, headers
273
+ end
274
+ # Get a execution detail by id
275
+ # Get a execution detail by id
276
+ # @param project_name The name of the project
277
+ # @param preheat_policy_name Preheat Policy Name
278
+ # @param execution_id Execution ID
279
+ # @param [Hash] opts the optional parameters
280
+ # @option opts [String] :x_request_id An unique ID for the request
281
+ # @return [Execution]
282
+ def get_execution(project_name, preheat_policy_name, execution_id, opts = {})
283
+ data, _status_code, _headers = get_execution_with_http_info(project_name, preheat_policy_name, execution_id, opts)
284
+ data
285
+ end
286
+
287
+ # Get a execution detail by id
288
+ # Get a execution detail by id
289
+ # @param project_name The name of the project
290
+ # @param preheat_policy_name Preheat Policy Name
291
+ # @param execution_id Execution ID
292
+ # @param [Hash] opts the optional parameters
293
+ # @option opts [String] :x_request_id An unique ID for the request
294
+ # @return [Array<(Execution, Fixnum, Hash)>] Execution data, response status code and response headers
295
+ def get_execution_with_http_info(project_name, preheat_policy_name, execution_id, opts = {})
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug 'Calling API: PreheatApi.get_execution ...'
298
+ end
299
+ # verify the required parameter 'project_name' is set
300
+ if @api_client.config.client_side_validation && project_name.nil?
301
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.get_execution"
302
+ end
303
+ # verify the required parameter 'preheat_policy_name' is set
304
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
305
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.get_execution"
306
+ end
307
+ # verify the required parameter 'execution_id' is set
308
+ if @api_client.config.client_side_validation && execution_id.nil?
309
+ fail ArgumentError, "Missing the required parameter 'execution_id' when calling PreheatApi.get_execution"
310
+ end
311
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
312
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.get_execution, the character length must be great than or equal to 1.'
313
+ end
314
+
315
+ # resource path
316
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s).sub('{' + 'execution_id' + '}', execution_id.to_s)
317
+
318
+ # query parameters
319
+ query_params = {}
320
+
321
+ # header parameters
322
+ header_params = {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
325
+ # HTTP header 'Content-Type'
326
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
327
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
328
+
329
+ # form parameters
330
+ form_params = {}
331
+
332
+ # http body (model)
333
+ post_body = nil
334
+ auth_names = ['basic']
335
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
336
+ :header_params => header_params,
337
+ :query_params => query_params,
338
+ :form_params => form_params,
339
+ :body => post_body,
340
+ :auth_names => auth_names,
341
+ :return_type => 'Execution')
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug "API called: PreheatApi#get_execution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
344
+ end
345
+ return data, status_code, headers
346
+ end
347
+ # Get a P2P provider instance
348
+ # Get a P2P provider instance
349
+ # @param preheat_instance_name Instance Name
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [String] :x_request_id An unique ID for the request
352
+ # @return [Instance]
353
+ def get_instance(preheat_instance_name, opts = {})
354
+ data, _status_code, _headers = get_instance_with_http_info(preheat_instance_name, opts)
355
+ data
356
+ end
357
+
358
+ # Get a P2P provider instance
359
+ # Get a P2P provider instance
360
+ # @param preheat_instance_name Instance Name
361
+ # @param [Hash] opts the optional parameters
362
+ # @option opts [String] :x_request_id An unique ID for the request
363
+ # @return [Array<(Instance, Fixnum, Hash)>] Instance data, response status code and response headers
364
+ def get_instance_with_http_info(preheat_instance_name, opts = {})
365
+ if @api_client.config.debugging
366
+ @api_client.config.logger.debug 'Calling API: PreheatApi.get_instance ...'
367
+ end
368
+ # verify the required parameter 'preheat_instance_name' is set
369
+ if @api_client.config.client_side_validation && preheat_instance_name.nil?
370
+ fail ArgumentError, "Missing the required parameter 'preheat_instance_name' when calling PreheatApi.get_instance"
371
+ end
372
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
373
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.get_instance, the character length must be great than or equal to 1.'
374
+ end
375
+
376
+ # resource path
377
+ local_var_path = '/p2p/preheat/instances/{preheat_instance_name}'.sub('{' + 'preheat_instance_name' + '}', preheat_instance_name.to_s)
378
+
379
+ # query parameters
380
+ query_params = {}
381
+
382
+ # header parameters
383
+ header_params = {}
384
+ # HTTP header 'Accept' (if needed)
385
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
386
+ # HTTP header 'Content-Type'
387
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
388
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
389
+
390
+ # form parameters
391
+ form_params = {}
392
+
393
+ # http body (model)
394
+ post_body = nil
395
+ auth_names = ['basic']
396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names,
402
+ :return_type => 'Instance')
403
+ if @api_client.config.debugging
404
+ @api_client.config.logger.debug "API called: PreheatApi#get_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
405
+ end
406
+ return data, status_code, headers
407
+ end
408
+ # Get a preheat policy
409
+ # Get a preheat policy
410
+ # @param project_name The name of the project
411
+ # @param preheat_policy_name Preheat Policy Name
412
+ # @param [Hash] opts the optional parameters
413
+ # @option opts [String] :x_request_id An unique ID for the request
414
+ # @return [PreheatPolicy]
415
+ def get_policy(project_name, preheat_policy_name, opts = {})
416
+ data, _status_code, _headers = get_policy_with_http_info(project_name, preheat_policy_name, opts)
417
+ data
418
+ end
419
+
420
+ # Get a preheat policy
421
+ # Get a preheat policy
422
+ # @param project_name The name of the project
423
+ # @param preheat_policy_name Preheat Policy Name
424
+ # @param [Hash] opts the optional parameters
425
+ # @option opts [String] :x_request_id An unique ID for the request
426
+ # @return [Array<(PreheatPolicy, Fixnum, Hash)>] PreheatPolicy data, response status code and response headers
427
+ def get_policy_with_http_info(project_name, preheat_policy_name, opts = {})
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug 'Calling API: PreheatApi.get_policy ...'
430
+ end
431
+ # verify the required parameter 'project_name' is set
432
+ if @api_client.config.client_side_validation && project_name.nil?
433
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.get_policy"
434
+ end
435
+ # verify the required parameter 'preheat_policy_name' is set
436
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
437
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.get_policy"
438
+ end
439
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
440
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.get_policy, the character length must be great than or equal to 1.'
441
+ end
442
+
443
+ # resource path
444
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s)
445
+
446
+ # query parameters
447
+ query_params = {}
448
+
449
+ # header parameters
450
+ header_params = {}
451
+ # HTTP header 'Accept' (if needed)
452
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
453
+ # HTTP header 'Content-Type'
454
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
455
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
456
+
457
+ # form parameters
458
+ form_params = {}
459
+
460
+ # http body (model)
461
+ post_body = nil
462
+ auth_names = ['basic']
463
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
464
+ :header_params => header_params,
465
+ :query_params => query_params,
466
+ :form_params => form_params,
467
+ :body => post_body,
468
+ :auth_names => auth_names,
469
+ :return_type => 'PreheatPolicy')
470
+ if @api_client.config.debugging
471
+ @api_client.config.logger.debug "API called: PreheatApi#get_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
472
+ end
473
+ return data, status_code, headers
474
+ end
475
+ # Get the log text stream of the specified task for the given execution
476
+ # Get the log text stream of the specified task for the given execution
477
+ # @param project_name The name of the project
478
+ # @param preheat_policy_name Preheat Policy Name
479
+ # @param execution_id Execution ID
480
+ # @param task_id Task ID
481
+ # @param [Hash] opts the optional parameters
482
+ # @option opts [String] :x_request_id An unique ID for the request
483
+ # @return [String]
484
+ def get_preheat_log(project_name, preheat_policy_name, execution_id, task_id, opts = {})
485
+ data, _status_code, _headers = get_preheat_log_with_http_info(project_name, preheat_policy_name, execution_id, task_id, opts)
486
+ data
487
+ end
488
+
489
+ # Get the log text stream of the specified task for the given execution
490
+ # Get the log text stream of the specified task for the given execution
491
+ # @param project_name The name of the project
492
+ # @param preheat_policy_name Preheat Policy Name
493
+ # @param execution_id Execution ID
494
+ # @param task_id Task ID
495
+ # @param [Hash] opts the optional parameters
496
+ # @option opts [String] :x_request_id An unique ID for the request
497
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
498
+ def get_preheat_log_with_http_info(project_name, preheat_policy_name, execution_id, task_id, opts = {})
499
+ if @api_client.config.debugging
500
+ @api_client.config.logger.debug 'Calling API: PreheatApi.get_preheat_log ...'
501
+ end
502
+ # verify the required parameter 'project_name' is set
503
+ if @api_client.config.client_side_validation && project_name.nil?
504
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.get_preheat_log"
505
+ end
506
+ # verify the required parameter 'preheat_policy_name' is set
507
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
508
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.get_preheat_log"
509
+ end
510
+ # verify the required parameter 'execution_id' is set
511
+ if @api_client.config.client_side_validation && execution_id.nil?
512
+ fail ArgumentError, "Missing the required parameter 'execution_id' when calling PreheatApi.get_preheat_log"
513
+ end
514
+ # verify the required parameter 'task_id' is set
515
+ if @api_client.config.client_side_validation && task_id.nil?
516
+ fail ArgumentError, "Missing the required parameter 'task_id' when calling PreheatApi.get_preheat_log"
517
+ end
518
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
519
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.get_preheat_log, the character length must be great than or equal to 1.'
520
+ end
521
+
522
+ # resource path
523
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks/{task_id}/logs'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s).sub('{' + 'execution_id' + '}', execution_id.to_s).sub('{' + 'task_id' + '}', task_id.to_s)
524
+
525
+ # query parameters
526
+ query_params = {}
527
+
528
+ # header parameters
529
+ header_params = {}
530
+ # HTTP header 'Accept' (if needed)
531
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
532
+ # HTTP header 'Content-Type'
533
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
534
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
535
+
536
+ # form parameters
537
+ form_params = {}
538
+
539
+ # http body (model)
540
+ post_body = nil
541
+ auth_names = ['basic']
542
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
543
+ :header_params => header_params,
544
+ :query_params => query_params,
545
+ :form_params => form_params,
546
+ :body => post_body,
547
+ :auth_names => auth_names,
548
+ :return_type => 'String')
549
+ if @api_client.config.debugging
550
+ @api_client.config.logger.debug "API called: PreheatApi#get_preheat_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
551
+ end
552
+ return data, status_code, headers
553
+ end
554
+ # List executions for the given policy
555
+ # List executions for the given policy
556
+ # @param project_name The name of the project
557
+ # @param preheat_policy_name Preheat Policy Name
558
+ # @param [Hash] opts the optional parameters
559
+ # @option opts [String] :x_request_id An unique ID for the request
560
+ # @option opts [Integer] :page The page number (default to 1)
561
+ # @option opts [Integer] :page_size The size of per page (default to 10)
562
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
563
+ # @return [Array<Execution>]
564
+ def list_executions(project_name, preheat_policy_name, opts = {})
565
+ data, _status_code, _headers = list_executions_with_http_info(project_name, preheat_policy_name, opts)
566
+ data
567
+ end
568
+
569
+ # List executions for the given policy
570
+ # List executions for the given policy
571
+ # @param project_name The name of the project
572
+ # @param preheat_policy_name Preheat Policy Name
573
+ # @param [Hash] opts the optional parameters
574
+ # @option opts [String] :x_request_id An unique ID for the request
575
+ # @option opts [Integer] :page The page number
576
+ # @option opts [Integer] :page_size The size of per page
577
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
578
+ # @return [Array<(Array<Execution>, Fixnum, Hash)>] Array<Execution> data, response status code and response headers
579
+ def list_executions_with_http_info(project_name, preheat_policy_name, opts = {})
580
+ if @api_client.config.debugging
581
+ @api_client.config.logger.debug 'Calling API: PreheatApi.list_executions ...'
582
+ end
583
+ # verify the required parameter 'project_name' is set
584
+ if @api_client.config.client_side_validation && project_name.nil?
585
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.list_executions"
586
+ end
587
+ # verify the required parameter 'preheat_policy_name' is set
588
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
589
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.list_executions"
590
+ end
591
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
592
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.list_executions, the character length must be great than or equal to 1.'
593
+ end
594
+
595
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
596
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PreheatApi.list_executions, must be smaller than or equal to 100.'
597
+ end
598
+
599
+ # resource path
600
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s)
601
+
602
+ # query parameters
603
+ query_params = {}
604
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
605
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
606
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
607
+
608
+ # header parameters
609
+ header_params = {}
610
+ # HTTP header 'Accept' (if needed)
611
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
612
+ # HTTP header 'Content-Type'
613
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
614
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
615
+
616
+ # form parameters
617
+ form_params = {}
618
+
619
+ # http body (model)
620
+ post_body = nil
621
+ auth_names = ['basic']
622
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
623
+ :header_params => header_params,
624
+ :query_params => query_params,
625
+ :form_params => form_params,
626
+ :body => post_body,
627
+ :auth_names => auth_names,
628
+ :return_type => 'Array<Execution>')
629
+ if @api_client.config.debugging
630
+ @api_client.config.logger.debug "API called: PreheatApi#list_executions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
631
+ end
632
+ return data, status_code, headers
633
+ end
634
+ # List P2P provider instances
635
+ # List P2P provider instances
636
+ # @param [Hash] opts the optional parameters
637
+ # @option opts [String] :x_request_id An unique ID for the request
638
+ # @option opts [Integer] :page The page number (default to 1)
639
+ # @option opts [Integer] :page_size The size of per page (default to 10)
640
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
641
+ # @return [Array<Instance>]
642
+ def list_instances(opts = {})
643
+ data, _status_code, _headers = list_instances_with_http_info(opts)
644
+ data
645
+ end
646
+
647
+ # List P2P provider instances
648
+ # List P2P provider instances
649
+ # @param [Hash] opts the optional parameters
650
+ # @option opts [String] :x_request_id An unique ID for the request
651
+ # @option opts [Integer] :page The page number
652
+ # @option opts [Integer] :page_size The size of per page
653
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
654
+ # @return [Array<(Array<Instance>, Fixnum, Hash)>] Array<Instance> data, response status code and response headers
655
+ def list_instances_with_http_info(opts = {})
656
+ if @api_client.config.debugging
657
+ @api_client.config.logger.debug 'Calling API: PreheatApi.list_instances ...'
658
+ end
659
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
660
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.list_instances, the character length must be great than or equal to 1.'
661
+ end
662
+
663
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
664
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PreheatApi.list_instances, must be smaller than or equal to 100.'
665
+ end
666
+
667
+ # resource path
668
+ local_var_path = '/p2p/preheat/instances'
669
+
670
+ # query parameters
671
+ query_params = {}
672
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
673
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
674
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
675
+
676
+ # header parameters
677
+ header_params = {}
678
+ # HTTP header 'Accept' (if needed)
679
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
680
+ # HTTP header 'Content-Type'
681
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
682
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
683
+
684
+ # form parameters
685
+ form_params = {}
686
+
687
+ # http body (model)
688
+ post_body = nil
689
+ auth_names = ['basic']
690
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
691
+ :header_params => header_params,
692
+ :query_params => query_params,
693
+ :form_params => form_params,
694
+ :body => post_body,
695
+ :auth_names => auth_names,
696
+ :return_type => 'Array<Instance>')
697
+ if @api_client.config.debugging
698
+ @api_client.config.logger.debug "API called: PreheatApi#list_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
699
+ end
700
+ return data, status_code, headers
701
+ end
702
+ # List preheat policies
703
+ # List preheat policies
704
+ # @param project_name The name of the project
705
+ # @param [Hash] opts the optional parameters
706
+ # @option opts [String] :x_request_id An unique ID for the request
707
+ # @option opts [Integer] :page The page number (default to 1)
708
+ # @option opts [Integer] :page_size The size of per page (default to 10)
709
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
710
+ # @return [Array<PreheatPolicy>]
711
+ def list_policies(project_name, opts = {})
712
+ data, _status_code, _headers = list_policies_with_http_info(project_name, opts)
713
+ data
714
+ end
715
+
716
+ # List preheat policies
717
+ # List preheat policies
718
+ # @param project_name The name of the project
719
+ # @param [Hash] opts the optional parameters
720
+ # @option opts [String] :x_request_id An unique ID for the request
721
+ # @option opts [Integer] :page The page number
722
+ # @option opts [Integer] :page_size The size of per page
723
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
724
+ # @return [Array<(Array<PreheatPolicy>, Fixnum, Hash)>] Array<PreheatPolicy> data, response status code and response headers
725
+ def list_policies_with_http_info(project_name, opts = {})
726
+ if @api_client.config.debugging
727
+ @api_client.config.logger.debug 'Calling API: PreheatApi.list_policies ...'
728
+ end
729
+ # verify the required parameter 'project_name' is set
730
+ if @api_client.config.client_side_validation && project_name.nil?
731
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.list_policies"
732
+ end
733
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
734
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.list_policies, the character length must be great than or equal to 1.'
735
+ end
736
+
737
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
738
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PreheatApi.list_policies, must be smaller than or equal to 100.'
739
+ end
740
+
741
+ # resource path
742
+ local_var_path = '/projects/{project_name}/preheat/policies'.sub('{' + 'project_name' + '}', project_name.to_s)
743
+
744
+ # query parameters
745
+ query_params = {}
746
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
747
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
748
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
749
+
750
+ # header parameters
751
+ header_params = {}
752
+ # HTTP header 'Accept' (if needed)
753
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
754
+ # HTTP header 'Content-Type'
755
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
756
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
757
+
758
+ # form parameters
759
+ form_params = {}
760
+
761
+ # http body (model)
762
+ post_body = nil
763
+ auth_names = ['basic']
764
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
765
+ :header_params => header_params,
766
+ :query_params => query_params,
767
+ :form_params => form_params,
768
+ :body => post_body,
769
+ :auth_names => auth_names,
770
+ :return_type => 'Array<PreheatPolicy>')
771
+ if @api_client.config.debugging
772
+ @api_client.config.logger.debug "API called: PreheatApi#list_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
773
+ end
774
+ return data, status_code, headers
775
+ end
776
+ # List P2P providers
777
+ # List P2P providers
778
+ # @param [Hash] opts the optional parameters
779
+ # @option opts [String] :x_request_id An unique ID for the request
780
+ # @return [Array<Metadata>]
781
+ def list_providers(opts = {})
782
+ data, _status_code, _headers = list_providers_with_http_info(opts)
783
+ data
784
+ end
785
+
786
+ # List P2P providers
787
+ # List P2P providers
788
+ # @param [Hash] opts the optional parameters
789
+ # @option opts [String] :x_request_id An unique ID for the request
790
+ # @return [Array<(Array<Metadata>, Fixnum, Hash)>] Array<Metadata> data, response status code and response headers
791
+ def list_providers_with_http_info(opts = {})
792
+ if @api_client.config.debugging
793
+ @api_client.config.logger.debug 'Calling API: PreheatApi.list_providers ...'
794
+ end
795
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
796
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.list_providers, the character length must be great than or equal to 1.'
797
+ end
798
+
799
+ # resource path
800
+ local_var_path = '/p2p/preheat/providers'
801
+
802
+ # query parameters
803
+ query_params = {}
804
+
805
+ # header parameters
806
+ header_params = {}
807
+ # HTTP header 'Accept' (if needed)
808
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
809
+ # HTTP header 'Content-Type'
810
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
811
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
812
+
813
+ # form parameters
814
+ form_params = {}
815
+
816
+ # http body (model)
817
+ post_body = nil
818
+ auth_names = ['basic']
819
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
820
+ :header_params => header_params,
821
+ :query_params => query_params,
822
+ :form_params => form_params,
823
+ :body => post_body,
824
+ :auth_names => auth_names,
825
+ :return_type => 'Array<Metadata>')
826
+ if @api_client.config.debugging
827
+ @api_client.config.logger.debug "API called: PreheatApi#list_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
828
+ end
829
+ return data, status_code, headers
830
+ end
831
+ # Get all providers at project level
832
+ # Get all providers at project level
833
+ # @param project_name The name of the project
834
+ # @param [Hash] opts the optional parameters
835
+ # @option opts [String] :x_request_id An unique ID for the request
836
+ # @return [Array<ProviderUnderProject>]
837
+ def list_providers_under_project(project_name, opts = {})
838
+ data, _status_code, _headers = list_providers_under_project_with_http_info(project_name, opts)
839
+ data
840
+ end
841
+
842
+ # Get all providers at project level
843
+ # Get all providers at project level
844
+ # @param project_name The name of the project
845
+ # @param [Hash] opts the optional parameters
846
+ # @option opts [String] :x_request_id An unique ID for the request
847
+ # @return [Array<(Array<ProviderUnderProject>, Fixnum, Hash)>] Array<ProviderUnderProject> data, response status code and response headers
848
+ def list_providers_under_project_with_http_info(project_name, opts = {})
849
+ if @api_client.config.debugging
850
+ @api_client.config.logger.debug 'Calling API: PreheatApi.list_providers_under_project ...'
851
+ end
852
+ # verify the required parameter 'project_name' is set
853
+ if @api_client.config.client_side_validation && project_name.nil?
854
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.list_providers_under_project"
855
+ end
856
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
857
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.list_providers_under_project, the character length must be great than or equal to 1.'
858
+ end
859
+
860
+ # resource path
861
+ local_var_path = '/projects/{project_name}/preheat/providers'.sub('{' + 'project_name' + '}', project_name.to_s)
862
+
863
+ # query parameters
864
+ query_params = {}
865
+
866
+ # header parameters
867
+ header_params = {}
868
+ # HTTP header 'Accept' (if needed)
869
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
870
+ # HTTP header 'Content-Type'
871
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
872
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
873
+
874
+ # form parameters
875
+ form_params = {}
876
+
877
+ # http body (model)
878
+ post_body = nil
879
+ auth_names = ['basic']
880
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
881
+ :header_params => header_params,
882
+ :query_params => query_params,
883
+ :form_params => form_params,
884
+ :body => post_body,
885
+ :auth_names => auth_names,
886
+ :return_type => 'Array<ProviderUnderProject>')
887
+ if @api_client.config.debugging
888
+ @api_client.config.logger.debug "API called: PreheatApi#list_providers_under_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
889
+ end
890
+ return data, status_code, headers
891
+ end
892
+ # List all the related tasks for the given execution
893
+ # List all the related tasks for the given execution
894
+ # @param project_name The name of the project
895
+ # @param preheat_policy_name Preheat Policy Name
896
+ # @param execution_id Execution ID
897
+ # @param [Hash] opts the optional parameters
898
+ # @option opts [String] :x_request_id An unique ID for the request
899
+ # @option opts [Integer] :page The page number (default to 1)
900
+ # @option opts [Integer] :page_size The size of per page (default to 10)
901
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
902
+ # @return [Array<Task>]
903
+ def list_tasks(project_name, preheat_policy_name, execution_id, opts = {})
904
+ data, _status_code, _headers = list_tasks_with_http_info(project_name, preheat_policy_name, execution_id, opts)
905
+ data
906
+ end
907
+
908
+ # List all the related tasks for the given execution
909
+ # List all the related tasks for the given execution
910
+ # @param project_name The name of the project
911
+ # @param preheat_policy_name Preheat Policy Name
912
+ # @param execution_id Execution ID
913
+ # @param [Hash] opts the optional parameters
914
+ # @option opts [String] :x_request_id An unique ID for the request
915
+ # @option opts [Integer] :page The page number
916
+ # @option opts [Integer] :page_size The size of per page
917
+ # @option opts [String] :q Query string to query resources. Supported query patterns are \&quot;exact match(k&#x3D;v)\&quot;, \&quot;fuzzy match(k&#x3D;~v)\&quot;, \&quot;range(k&#x3D;[min~max])\&quot;, \&quot;list with union releationship(k&#x3D;{v1 v2 v3})\&quot; and \&quot;list with intersetion relationship(k&#x3D;(v1 v2 v3))\&quot;. The value of range and list can be string(enclosed by \&quot; or &#39;), integer or time(in format \&quot;2020-04-09 02:36:00\&quot;). All of these query patterns should be put in the query string \&quot;q&#x3D;xxx\&quot; and splitted by \&quot;,\&quot;. e.g. q&#x3D;k1&#x3D;v1,k2&#x3D;~v2,k3&#x3D;[min~max]
918
+ # @return [Array<(Array<Task>, Fixnum, Hash)>] Array<Task> data, response status code and response headers
919
+ def list_tasks_with_http_info(project_name, preheat_policy_name, execution_id, opts = {})
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug 'Calling API: PreheatApi.list_tasks ...'
922
+ end
923
+ # verify the required parameter 'project_name' is set
924
+ if @api_client.config.client_side_validation && project_name.nil?
925
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.list_tasks"
926
+ end
927
+ # verify the required parameter 'preheat_policy_name' is set
928
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
929
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.list_tasks"
930
+ end
931
+ # verify the required parameter 'execution_id' is set
932
+ if @api_client.config.client_side_validation && execution_id.nil?
933
+ fail ArgumentError, "Missing the required parameter 'execution_id' when calling PreheatApi.list_tasks"
934
+ end
935
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
936
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.list_tasks, the character length must be great than or equal to 1.'
937
+ end
938
+
939
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
940
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PreheatApi.list_tasks, must be smaller than or equal to 100.'
941
+ end
942
+
943
+ # resource path
944
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s).sub('{' + 'execution_id' + '}', execution_id.to_s)
945
+
946
+ # query parameters
947
+ query_params = {}
948
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
949
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
950
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
951
+
952
+ # header parameters
953
+ header_params = {}
954
+ # HTTP header 'Accept' (if needed)
955
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
956
+ # HTTP header 'Content-Type'
957
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
958
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
959
+
960
+ # form parameters
961
+ form_params = {}
962
+
963
+ # http body (model)
964
+ post_body = nil
965
+ auth_names = ['basic']
966
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
967
+ :header_params => header_params,
968
+ :query_params => query_params,
969
+ :form_params => form_params,
970
+ :body => post_body,
971
+ :auth_names => auth_names,
972
+ :return_type => 'Array<Task>')
973
+ if @api_client.config.debugging
974
+ @api_client.config.logger.debug "API called: PreheatApi#list_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
975
+ end
976
+ return data, status_code, headers
977
+ end
978
+ # Manual preheat
979
+ # Manual preheat
980
+ # @param project_name The name of the project
981
+ # @param preheat_policy_name Preheat Policy Name
982
+ # @param policy The policy schema info
983
+ # @param [Hash] opts the optional parameters
984
+ # @option opts [String] :x_request_id An unique ID for the request
985
+ # @return [nil]
986
+ def manual_preheat(project_name, preheat_policy_name, policy, opts = {})
987
+ manual_preheat_with_http_info(project_name, preheat_policy_name, policy, opts)
988
+ nil
989
+ end
990
+
991
+ # Manual preheat
992
+ # Manual preheat
993
+ # @param project_name The name of the project
994
+ # @param preheat_policy_name Preheat Policy Name
995
+ # @param policy The policy schema info
996
+ # @param [Hash] opts the optional parameters
997
+ # @option opts [String] :x_request_id An unique ID for the request
998
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
999
+ def manual_preheat_with_http_info(project_name, preheat_policy_name, policy, opts = {})
1000
+ if @api_client.config.debugging
1001
+ @api_client.config.logger.debug 'Calling API: PreheatApi.manual_preheat ...'
1002
+ end
1003
+ # verify the required parameter 'project_name' is set
1004
+ if @api_client.config.client_side_validation && project_name.nil?
1005
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.manual_preheat"
1006
+ end
1007
+ # verify the required parameter 'preheat_policy_name' is set
1008
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
1009
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.manual_preheat"
1010
+ end
1011
+ # verify the required parameter 'policy' is set
1012
+ if @api_client.config.client_side_validation && policy.nil?
1013
+ fail ArgumentError, "Missing the required parameter 'policy' when calling PreheatApi.manual_preheat"
1014
+ end
1015
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
1016
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.manual_preheat, the character length must be great than or equal to 1.'
1017
+ end
1018
+
1019
+ # resource path
1020
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s)
1021
+
1022
+ # query parameters
1023
+ query_params = {}
1024
+
1025
+ # header parameters
1026
+ header_params = {}
1027
+ # HTTP header 'Accept' (if needed)
1028
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1029
+ # HTTP header 'Content-Type'
1030
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1031
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
1032
+
1033
+ # form parameters
1034
+ form_params = {}
1035
+
1036
+ # http body (model)
1037
+ post_body = @api_client.object_to_http_body(policy)
1038
+ auth_names = ['basic']
1039
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1040
+ :header_params => header_params,
1041
+ :query_params => query_params,
1042
+ :form_params => form_params,
1043
+ :body => post_body,
1044
+ :auth_names => auth_names)
1045
+ if @api_client.config.debugging
1046
+ @api_client.config.logger.debug "API called: PreheatApi#manual_preheat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1047
+ end
1048
+ return data, status_code, headers
1049
+ end
1050
+ # Ping status of a instance.
1051
+ # This endpoint checks status of a instance, the instance can be given by ID or Endpoint URL (together with credential)
1052
+ # @param instance The JSON object of instance.
1053
+ # @param [Hash] opts the optional parameters
1054
+ # @option opts [String] :x_request_id An unique ID for the request
1055
+ # @return [nil]
1056
+ def ping_instances(instance, opts = {})
1057
+ ping_instances_with_http_info(instance, opts)
1058
+ nil
1059
+ end
1060
+
1061
+ # Ping status of a instance.
1062
+ # This endpoint checks status of a instance, the instance can be given by ID or Endpoint URL (together with credential)
1063
+ # @param instance The JSON object of instance.
1064
+ # @param [Hash] opts the optional parameters
1065
+ # @option opts [String] :x_request_id An unique ID for the request
1066
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1067
+ def ping_instances_with_http_info(instance, opts = {})
1068
+ if @api_client.config.debugging
1069
+ @api_client.config.logger.debug 'Calling API: PreheatApi.ping_instances ...'
1070
+ end
1071
+ # verify the required parameter 'instance' is set
1072
+ if @api_client.config.client_side_validation && instance.nil?
1073
+ fail ArgumentError, "Missing the required parameter 'instance' when calling PreheatApi.ping_instances"
1074
+ end
1075
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
1076
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.ping_instances, the character length must be great than or equal to 1.'
1077
+ end
1078
+
1079
+ # resource path
1080
+ local_var_path = '/p2p/preheat/instances/ping'
1081
+
1082
+ # query parameters
1083
+ query_params = {}
1084
+
1085
+ # header parameters
1086
+ header_params = {}
1087
+ # HTTP header 'Accept' (if needed)
1088
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1089
+ # HTTP header 'Content-Type'
1090
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1091
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
1092
+
1093
+ # form parameters
1094
+ form_params = {}
1095
+
1096
+ # http body (model)
1097
+ post_body = @api_client.object_to_http_body(instance)
1098
+ auth_names = ['basic']
1099
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1100
+ :header_params => header_params,
1101
+ :query_params => query_params,
1102
+ :form_params => form_params,
1103
+ :body => post_body,
1104
+ :auth_names => auth_names)
1105
+ if @api_client.config.debugging
1106
+ @api_client.config.logger.debug "API called: PreheatApi#ping_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1107
+ end
1108
+ return data, status_code, headers
1109
+ end
1110
+ # Stop a execution
1111
+ # Stop a execution
1112
+ # @param project_name The name of the project
1113
+ # @param preheat_policy_name Preheat Policy Name
1114
+ # @param execution_id Execution ID
1115
+ # @param execution The data of execution
1116
+ # @param [Hash] opts the optional parameters
1117
+ # @option opts [String] :x_request_id An unique ID for the request
1118
+ # @return [nil]
1119
+ def stop_execution(project_name, preheat_policy_name, execution_id, execution, opts = {})
1120
+ stop_execution_with_http_info(project_name, preheat_policy_name, execution_id, execution, opts)
1121
+ nil
1122
+ end
1123
+
1124
+ # Stop a execution
1125
+ # Stop a execution
1126
+ # @param project_name The name of the project
1127
+ # @param preheat_policy_name Preheat Policy Name
1128
+ # @param execution_id Execution ID
1129
+ # @param execution The data of execution
1130
+ # @param [Hash] opts the optional parameters
1131
+ # @option opts [String] :x_request_id An unique ID for the request
1132
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1133
+ def stop_execution_with_http_info(project_name, preheat_policy_name, execution_id, execution, opts = {})
1134
+ if @api_client.config.debugging
1135
+ @api_client.config.logger.debug 'Calling API: PreheatApi.stop_execution ...'
1136
+ end
1137
+ # verify the required parameter 'project_name' is set
1138
+ if @api_client.config.client_side_validation && project_name.nil?
1139
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.stop_execution"
1140
+ end
1141
+ # verify the required parameter 'preheat_policy_name' is set
1142
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
1143
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.stop_execution"
1144
+ end
1145
+ # verify the required parameter 'execution_id' is set
1146
+ if @api_client.config.client_side_validation && execution_id.nil?
1147
+ fail ArgumentError, "Missing the required parameter 'execution_id' when calling PreheatApi.stop_execution"
1148
+ end
1149
+ # verify the required parameter 'execution' is set
1150
+ if @api_client.config.client_side_validation && execution.nil?
1151
+ fail ArgumentError, "Missing the required parameter 'execution' when calling PreheatApi.stop_execution"
1152
+ end
1153
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
1154
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.stop_execution, the character length must be great than or equal to 1.'
1155
+ end
1156
+
1157
+ # resource path
1158
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s).sub('{' + 'execution_id' + '}', execution_id.to_s)
1159
+
1160
+ # query parameters
1161
+ query_params = {}
1162
+
1163
+ # header parameters
1164
+ header_params = {}
1165
+ # HTTP header 'Accept' (if needed)
1166
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1167
+ # HTTP header 'Content-Type'
1168
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1169
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
1170
+
1171
+ # form parameters
1172
+ form_params = {}
1173
+
1174
+ # http body (model)
1175
+ post_body = @api_client.object_to_http_body(execution)
1176
+ auth_names = ['basic']
1177
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1178
+ :header_params => header_params,
1179
+ :query_params => query_params,
1180
+ :form_params => form_params,
1181
+ :body => post_body,
1182
+ :auth_names => auth_names)
1183
+ if @api_client.config.debugging
1184
+ @api_client.config.logger.debug "API called: PreheatApi#stop_execution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1185
+ end
1186
+ return data, status_code, headers
1187
+ end
1188
+ # Update the specified P2P provider instance
1189
+ # Update the specified P2P provider instance
1190
+ # @param preheat_instance_name Instance Name
1191
+ # @param instance The instance to update
1192
+ # @param [Hash] opts the optional parameters
1193
+ # @option opts [String] :x_request_id An unique ID for the request
1194
+ # @return [nil]
1195
+ def update_instance(preheat_instance_name, instance, opts = {})
1196
+ update_instance_with_http_info(preheat_instance_name, instance, opts)
1197
+ nil
1198
+ end
1199
+
1200
+ # Update the specified P2P provider instance
1201
+ # Update the specified P2P provider instance
1202
+ # @param preheat_instance_name Instance Name
1203
+ # @param instance The instance to update
1204
+ # @param [Hash] opts the optional parameters
1205
+ # @option opts [String] :x_request_id An unique ID for the request
1206
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1207
+ def update_instance_with_http_info(preheat_instance_name, instance, opts = {})
1208
+ if @api_client.config.debugging
1209
+ @api_client.config.logger.debug 'Calling API: PreheatApi.update_instance ...'
1210
+ end
1211
+ # verify the required parameter 'preheat_instance_name' is set
1212
+ if @api_client.config.client_side_validation && preheat_instance_name.nil?
1213
+ fail ArgumentError, "Missing the required parameter 'preheat_instance_name' when calling PreheatApi.update_instance"
1214
+ end
1215
+ # verify the required parameter 'instance' is set
1216
+ if @api_client.config.client_side_validation && instance.nil?
1217
+ fail ArgumentError, "Missing the required parameter 'instance' when calling PreheatApi.update_instance"
1218
+ end
1219
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
1220
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.update_instance, the character length must be great than or equal to 1.'
1221
+ end
1222
+
1223
+ # resource path
1224
+ local_var_path = '/p2p/preheat/instances/{preheat_instance_name}'.sub('{' + 'preheat_instance_name' + '}', preheat_instance_name.to_s)
1225
+
1226
+ # query parameters
1227
+ query_params = {}
1228
+
1229
+ # header parameters
1230
+ header_params = {}
1231
+ # HTTP header 'Accept' (if needed)
1232
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1233
+ # HTTP header 'Content-Type'
1234
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1235
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
1236
+
1237
+ # form parameters
1238
+ form_params = {}
1239
+
1240
+ # http body (model)
1241
+ post_body = @api_client.object_to_http_body(instance)
1242
+ auth_names = ['basic']
1243
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1244
+ :header_params => header_params,
1245
+ :query_params => query_params,
1246
+ :form_params => form_params,
1247
+ :body => post_body,
1248
+ :auth_names => auth_names)
1249
+ if @api_client.config.debugging
1250
+ @api_client.config.logger.debug "API called: PreheatApi#update_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1251
+ end
1252
+ return data, status_code, headers
1253
+ end
1254
+ # Update preheat policy
1255
+ # Update preheat policy
1256
+ # @param project_name The name of the project
1257
+ # @param preheat_policy_name Preheat Policy Name
1258
+ # @param policy The policy schema info
1259
+ # @param [Hash] opts the optional parameters
1260
+ # @option opts [String] :x_request_id An unique ID for the request
1261
+ # @return [nil]
1262
+ def update_policy(project_name, preheat_policy_name, policy, opts = {})
1263
+ update_policy_with_http_info(project_name, preheat_policy_name, policy, opts)
1264
+ nil
1265
+ end
1266
+
1267
+ # Update preheat policy
1268
+ # Update preheat policy
1269
+ # @param project_name The name of the project
1270
+ # @param preheat_policy_name Preheat Policy Name
1271
+ # @param policy The policy schema info
1272
+ # @param [Hash] opts the optional parameters
1273
+ # @option opts [String] :x_request_id An unique ID for the request
1274
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1275
+ def update_policy_with_http_info(project_name, preheat_policy_name, policy, opts = {})
1276
+ if @api_client.config.debugging
1277
+ @api_client.config.logger.debug 'Calling API: PreheatApi.update_policy ...'
1278
+ end
1279
+ # verify the required parameter 'project_name' is set
1280
+ if @api_client.config.client_side_validation && project_name.nil?
1281
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling PreheatApi.update_policy"
1282
+ end
1283
+ # verify the required parameter 'preheat_policy_name' is set
1284
+ if @api_client.config.client_side_validation && preheat_policy_name.nil?
1285
+ fail ArgumentError, "Missing the required parameter 'preheat_policy_name' when calling PreheatApi.update_policy"
1286
+ end
1287
+ # verify the required parameter 'policy' is set
1288
+ if @api_client.config.client_side_validation && policy.nil?
1289
+ fail ArgumentError, "Missing the required parameter 'policy' when calling PreheatApi.update_policy"
1290
+ end
1291
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
1292
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling PreheatApi.update_policy, the character length must be great than or equal to 1.'
1293
+ end
1294
+
1295
+ # resource path
1296
+ local_var_path = '/projects/{project_name}/preheat/policies/{preheat_policy_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'preheat_policy_name' + '}', preheat_policy_name.to_s)
1297
+
1298
+ # query parameters
1299
+ query_params = {}
1300
+
1301
+ # header parameters
1302
+ header_params = {}
1303
+ # HTTP header 'Accept' (if needed)
1304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1305
+ # HTTP header 'Content-Type'
1306
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1307
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
1308
+
1309
+ # form parameters
1310
+ form_params = {}
1311
+
1312
+ # http body (model)
1313
+ post_body = @api_client.object_to_http_body(policy)
1314
+ auth_names = ['basic']
1315
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1316
+ :header_params => header_params,
1317
+ :query_params => query_params,
1318
+ :form_params => form_params,
1319
+ :body => post_body,
1320
+ :auth_names => auth_names)
1321
+ if @api_client.config.debugging
1322
+ @api_client.config.logger.debug "API called: PreheatApi#update_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1323
+ end
1324
+ return data, status_code, headers
1325
+ end
1326
+ end
1327
+ end