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,380 @@
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 ReplicationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get the specific replication execution
23
+ # Get the replication execution specified by ID
24
+ # @param id The ID of the execution.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ReplicationExecution]
27
+ def get_replication_execution(id, opts = {})
28
+ data, _status_code, _headers = get_replication_execution_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Get the specific replication execution
33
+ # Get the replication execution specified by ID
34
+ # @param id The ID of the execution.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ReplicationExecution, Fixnum, Hash)>] ReplicationExecution data, response status code and response headers
37
+ def get_replication_execution_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ReplicationApi.get_replication_execution ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.get_replication_execution"
44
+ end
45
+ # resource path
46
+ local_var_path = '/replication/executions/{id}'.sub('{' + 'id' + '}', id.to_s)
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['basic']
64
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'ReplicationExecution')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: ReplicationApi#get_replication_execution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ # Get the log of the specific replication task
77
+ # Get the log of the specific replication task
78
+ # @param id The ID of the execution that the tasks belongs to.
79
+ # @param task_id The ID of the task.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [String]
82
+ def get_replication_log(id, task_id, opts = {})
83
+ data, _status_code, _headers = get_replication_log_with_http_info(id, task_id, opts)
84
+ data
85
+ end
86
+
87
+ # Get the log of the specific replication task
88
+ # Get the log of the specific replication task
89
+ # @param id The ID of the execution that the tasks belongs to.
90
+ # @param task_id The ID of the task.
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
93
+ def get_replication_log_with_http_info(id, task_id, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: ReplicationApi.get_replication_log ...'
96
+ end
97
+ # verify the required parameter 'id' is set
98
+ if @api_client.config.client_side_validation && id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.get_replication_log"
100
+ end
101
+ # verify the required parameter 'task_id' is set
102
+ if @api_client.config.client_side_validation && task_id.nil?
103
+ fail ArgumentError, "Missing the required parameter 'task_id' when calling ReplicationApi.get_replication_log"
104
+ end
105
+ # resource path
106
+ local_var_path = '/replication/executions/{id}/tasks/{task_id}/log'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'task_id' + '}', task_id.to_s)
107
+
108
+ # query parameters
109
+ query_params = {}
110
+
111
+ # header parameters
112
+ header_params = {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ # HTTP header 'Content-Type'
116
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
117
+
118
+ # form parameters
119
+ form_params = {}
120
+
121
+ # http body (model)
122
+ post_body = nil
123
+ auth_names = ['basic']
124
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
125
+ :header_params => header_params,
126
+ :query_params => query_params,
127
+ :form_params => form_params,
128
+ :body => post_body,
129
+ :auth_names => auth_names,
130
+ :return_type => 'String')
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called: ReplicationApi#get_replication_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
133
+ end
134
+ return data, status_code, headers
135
+ end
136
+ # List replication executions
137
+ # List replication executions
138
+ # @param [Hash] opts the optional parameters
139
+ # @option opts [Integer] :page The page number (default to 1)
140
+ # @option opts [Integer] :page_size The size of per page (default to 10)
141
+ # @option opts [Integer] :policy_id The ID of the policy that the executions belong to.
142
+ # @option opts [String] :status The execution status.
143
+ # @option opts [String] :trigger The trigger mode.
144
+ # @return [Array<ReplicationExecution>]
145
+ def list_replication_executions(opts = {})
146
+ data, _status_code, _headers = list_replication_executions_with_http_info(opts)
147
+ data
148
+ end
149
+
150
+ # List replication executions
151
+ # List replication executions
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [Integer] :page The page number
154
+ # @option opts [Integer] :page_size The size of per page
155
+ # @option opts [Integer] :policy_id The ID of the policy that the executions belong to.
156
+ # @option opts [String] :status The execution status.
157
+ # @option opts [String] :trigger The trigger mode.
158
+ # @return [Array<(Array<ReplicationExecution>, Fixnum, Hash)>] Array<ReplicationExecution> data, response status code and response headers
159
+ def list_replication_executions_with_http_info(opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: ReplicationApi.list_replication_executions ...'
162
+ end
163
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
164
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ReplicationApi.list_replication_executions, must be smaller than or equal to 100.'
165
+ end
166
+
167
+ # resource path
168
+ local_var_path = '/replication/executions'
169
+
170
+ # query parameters
171
+ query_params = {}
172
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
173
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
174
+ query_params[:'policy_id'] = opts[:'policy_id'] if !opts[:'policy_id'].nil?
175
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
176
+ query_params[:'trigger'] = opts[:'trigger'] if !opts[:'trigger'].nil?
177
+
178
+ # header parameters
179
+ header_params = {}
180
+ # HTTP header 'Accept' (if needed)
181
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
182
+ # HTTP header 'Content-Type'
183
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
184
+
185
+ # form parameters
186
+ form_params = {}
187
+
188
+ # http body (model)
189
+ post_body = nil
190
+ auth_names = ['basic']
191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => 'Array<ReplicationExecution>')
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug "API called: ReplicationApi#list_replication_executions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
200
+ end
201
+ return data, status_code, headers
202
+ end
203
+ # List replication tasks for a specific execution
204
+ # List replication tasks for a specific execution
205
+ # @param id The ID of the execution that the tasks belongs to.
206
+ # @param [Hash] opts the optional parameters
207
+ # @option opts [Integer] :page The page number (default to 1)
208
+ # @option opts [Integer] :page_size The size of per page (default to 10)
209
+ # @option opts [String] :status The task status.
210
+ # @option opts [String] :resource_type The resource type.
211
+ # @return [Array<ReplicationTask>]
212
+ def list_replication_tasks(id, opts = {})
213
+ data, _status_code, _headers = list_replication_tasks_with_http_info(id, opts)
214
+ data
215
+ end
216
+
217
+ # List replication tasks for a specific execution
218
+ # List replication tasks for a specific execution
219
+ # @param id The ID of the execution that the tasks belongs to.
220
+ # @param [Hash] opts the optional parameters
221
+ # @option opts [Integer] :page The page number
222
+ # @option opts [Integer] :page_size The size of per page
223
+ # @option opts [String] :status The task status.
224
+ # @option opts [String] :resource_type The resource type.
225
+ # @return [Array<(Array<ReplicationTask>, Fixnum, Hash)>] Array<ReplicationTask> data, response status code and response headers
226
+ def list_replication_tasks_with_http_info(id, opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug 'Calling API: ReplicationApi.list_replication_tasks ...'
229
+ end
230
+ # verify the required parameter 'id' is set
231
+ if @api_client.config.client_side_validation && id.nil?
232
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.list_replication_tasks"
233
+ end
234
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
235
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ReplicationApi.list_replication_tasks, must be smaller than or equal to 100.'
236
+ end
237
+
238
+ # resource path
239
+ local_var_path = '/replication/executions/{id}/tasks'.sub('{' + 'id' + '}', id.to_s)
240
+
241
+ # query parameters
242
+ query_params = {}
243
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
244
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
245
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
246
+ query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil?
247
+
248
+ # header parameters
249
+ header_params = {}
250
+ # HTTP header 'Accept' (if needed)
251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+ # HTTP header 'Content-Type'
253
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
254
+
255
+ # form parameters
256
+ form_params = {}
257
+
258
+ # http body (model)
259
+ post_body = nil
260
+ auth_names = ['basic']
261
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
262
+ :header_params => header_params,
263
+ :query_params => query_params,
264
+ :form_params => form_params,
265
+ :body => post_body,
266
+ :auth_names => auth_names,
267
+ :return_type => 'Array<ReplicationTask>')
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: ReplicationApi#list_replication_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+ # Start one replication execution
274
+ # Start one replication execution according to the policy
275
+ # @param execution The ID of policy that the execution belongs to
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [nil]
278
+ def start_replication(execution, opts = {})
279
+ start_replication_with_http_info(execution, opts)
280
+ nil
281
+ end
282
+
283
+ # Start one replication execution
284
+ # Start one replication execution according to the policy
285
+ # @param execution The ID of policy that the execution belongs to
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
288
+ def start_replication_with_http_info(execution, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug 'Calling API: ReplicationApi.start_replication ...'
291
+ end
292
+ # verify the required parameter 'execution' is set
293
+ if @api_client.config.client_side_validation && execution.nil?
294
+ fail ArgumentError, "Missing the required parameter 'execution' when calling ReplicationApi.start_replication"
295
+ end
296
+ # resource path
297
+ local_var_path = '/replication/executions'
298
+
299
+ # query parameters
300
+ query_params = {}
301
+
302
+ # header parameters
303
+ header_params = {}
304
+ # HTTP header 'Accept' (if needed)
305
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
306
+ # HTTP header 'Content-Type'
307
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
308
+
309
+ # form parameters
310
+ form_params = {}
311
+
312
+ # http body (model)
313
+ post_body = @api_client.object_to_http_body(execution)
314
+ auth_names = ['basic']
315
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
316
+ :header_params => header_params,
317
+ :query_params => query_params,
318
+ :form_params => form_params,
319
+ :body => post_body,
320
+ :auth_names => auth_names)
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug "API called: ReplicationApi#start_replication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
323
+ end
324
+ return data, status_code, headers
325
+ end
326
+ # Stop the specific replication execution
327
+ # Stop the replication execution specified by ID
328
+ # @param id The ID of the execution.
329
+ # @param [Hash] opts the optional parameters
330
+ # @return [nil]
331
+ def stop_replication(id, opts = {})
332
+ stop_replication_with_http_info(id, opts)
333
+ nil
334
+ end
335
+
336
+ # Stop the specific replication execution
337
+ # Stop the replication execution specified by ID
338
+ # @param id The ID of the execution.
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
341
+ def stop_replication_with_http_info(id, opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: ReplicationApi.stop_replication ...'
344
+ end
345
+ # verify the required parameter 'id' is set
346
+ if @api_client.config.client_side_validation && id.nil?
347
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReplicationApi.stop_replication"
348
+ end
349
+ # resource path
350
+ local_var_path = '/replication/executions/{id}'.sub('{' + 'id' + '}', id.to_s)
351
+
352
+ # query parameters
353
+ query_params = {}
354
+
355
+ # header parameters
356
+ header_params = {}
357
+ # HTTP header 'Accept' (if needed)
358
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
359
+ # HTTP header 'Content-Type'
360
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
361
+
362
+ # form parameters
363
+ form_params = {}
364
+
365
+ # http body (model)
366
+ post_body = nil
367
+ auth_names = ['basic']
368
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
369
+ :header_params => header_params,
370
+ :query_params => query_params,
371
+ :form_params => form_params,
372
+ :body => post_body,
373
+ :auth_names => auth_names)
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug "API called: ReplicationApi#stop_replication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
376
+ end
377
+ return data, status_code, headers
378
+ end
379
+ end
380
+ end
@@ -0,0 +1,302 @@
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 RepositoryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete repository
23
+ # Delete the repository specified by name
24
+ # @param project_name The name of the project
25
+ # @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -&gt; a%252Fb
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_request_id An unique ID for the request
28
+ # @return [nil]
29
+ def delete_repository(project_name, repository_name, opts = {})
30
+ delete_repository_with_http_info(project_name, repository_name, opts)
31
+ nil
32
+ end
33
+
34
+ # Delete repository
35
+ # Delete the repository specified by name
36
+ # @param project_name The name of the project
37
+ # @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -&gt; a%252Fb
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :x_request_id An unique ID for the request
40
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
41
+ def delete_repository_with_http_info(project_name, repository_name, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: RepositoryApi.delete_repository ...'
44
+ end
45
+ # verify the required parameter 'project_name' is set
46
+ if @api_client.config.client_side_validation && project_name.nil?
47
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.delete_repository"
48
+ end
49
+ # verify the required parameter 'repository_name' is set
50
+ if @api_client.config.client_side_validation && repository_name.nil?
51
+ fail ArgumentError, "Missing the required parameter 'repository_name' when calling RepositoryApi.delete_repository"
52
+ end
53
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
54
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.delete_repository, the character length must be great than or equal to 1.'
55
+ end
56
+
57
+ # resource path
58
+ local_var_path = '/projects/{project_name}/repositories/{repository_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'repository_name' + '}', repository_name.to_s)
59
+
60
+ # query parameters
61
+ query_params = {}
62
+
63
+ # header parameters
64
+ header_params = {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+ # HTTP header 'Content-Type'
68
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
69
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = ['basic']
77
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: RepositoryApi#delete_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ # Get repository
89
+ # Get the repository specified by name
90
+ # @param project_name The name of the project
91
+ # @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -&gt; a%252Fb
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [String] :x_request_id An unique ID for the request
94
+ # @return [Repository]
95
+ def get_repository(project_name, repository_name, opts = {})
96
+ data, _status_code, _headers = get_repository_with_http_info(project_name, repository_name, opts)
97
+ data
98
+ end
99
+
100
+ # Get repository
101
+ # Get the repository specified by name
102
+ # @param project_name The name of the project
103
+ # @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -&gt; a%252Fb
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :x_request_id An unique ID for the request
106
+ # @return [Array<(Repository, Fixnum, Hash)>] Repository data, response status code and response headers
107
+ def get_repository_with_http_info(project_name, repository_name, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: RepositoryApi.get_repository ...'
110
+ end
111
+ # verify the required parameter 'project_name' is set
112
+ if @api_client.config.client_side_validation && project_name.nil?
113
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.get_repository"
114
+ end
115
+ # verify the required parameter 'repository_name' is set
116
+ if @api_client.config.client_side_validation && repository_name.nil?
117
+ fail ArgumentError, "Missing the required parameter 'repository_name' when calling RepositoryApi.get_repository"
118
+ end
119
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
120
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.get_repository, the character length must be great than or equal to 1.'
121
+ end
122
+
123
+ # resource path
124
+ local_var_path = '/projects/{project_name}/repositories/{repository_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'repository_name' + '}', repository_name.to_s)
125
+
126
+ # query parameters
127
+ query_params = {}
128
+
129
+ # header parameters
130
+ header_params = {}
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
+ # HTTP header 'Content-Type'
134
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
135
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
136
+
137
+ # form parameters
138
+ form_params = {}
139
+
140
+ # http body (model)
141
+ post_body = nil
142
+ auth_names = ['basic']
143
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => 'Repository')
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: RepositoryApi#get_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+ # List repositories
156
+ # List repositories of the specified project
157
+ # @param project_name The name of the project
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :x_request_id An unique ID for the request
160
+ # @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]
161
+ # @option opts [Integer] :page The page number (default to 1)
162
+ # @option opts [Integer] :page_size The size of per page (default to 10)
163
+ # @return [Array<Repository>]
164
+ def list_repositories(project_name, opts = {})
165
+ data, _status_code, _headers = list_repositories_with_http_info(project_name, opts)
166
+ data
167
+ end
168
+
169
+ # List repositories
170
+ # List repositories of the specified project
171
+ # @param project_name The name of the project
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [String] :x_request_id An unique ID for the request
174
+ # @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]
175
+ # @option opts [Integer] :page The page number
176
+ # @option opts [Integer] :page_size The size of per page
177
+ # @return [Array<(Array<Repository>, Fixnum, Hash)>] Array<Repository> data, response status code and response headers
178
+ def list_repositories_with_http_info(project_name, opts = {})
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug 'Calling API: RepositoryApi.list_repositories ...'
181
+ end
182
+ # verify the required parameter 'project_name' is set
183
+ if @api_client.config.client_side_validation && project_name.nil?
184
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.list_repositories"
185
+ end
186
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
187
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.list_repositories, the character length must be great than or equal to 1.'
188
+ end
189
+
190
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
191
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RepositoryApi.list_repositories, must be smaller than or equal to 100.'
192
+ end
193
+
194
+ # resource path
195
+ local_var_path = '/projects/{project_name}/repositories'.sub('{' + 'project_name' + '}', project_name.to_s)
196
+
197
+ # query parameters
198
+ query_params = {}
199
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
200
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
201
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
202
+
203
+ # header parameters
204
+ header_params = {}
205
+ # HTTP header 'Accept' (if needed)
206
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
+ # HTTP header 'Content-Type'
208
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
209
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
210
+
211
+ # form parameters
212
+ form_params = {}
213
+
214
+ # http body (model)
215
+ post_body = nil
216
+ auth_names = ['basic']
217
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
218
+ :header_params => header_params,
219
+ :query_params => query_params,
220
+ :form_params => form_params,
221
+ :body => post_body,
222
+ :auth_names => auth_names,
223
+ :return_type => 'Array<Repository>')
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: RepositoryApi#list_repositories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+ # Update repository
230
+ # Update the repository specified by name
231
+ # @param project_name The name of the project
232
+ # @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -&gt; a%252Fb
233
+ # @param repository The JSON object of repository.
234
+ # @param [Hash] opts the optional parameters
235
+ # @option opts [String] :x_request_id An unique ID for the request
236
+ # @return [nil]
237
+ def update_repository(project_name, repository_name, repository, opts = {})
238
+ update_repository_with_http_info(project_name, repository_name, repository, opts)
239
+ nil
240
+ end
241
+
242
+ # Update repository
243
+ # Update the repository specified by name
244
+ # @param project_name The name of the project
245
+ # @param repository_name The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -&gt; a%252Fb
246
+ # @param repository The JSON object of repository.
247
+ # @param [Hash] opts the optional parameters
248
+ # @option opts [String] :x_request_id An unique ID for the request
249
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
250
+ def update_repository_with_http_info(project_name, repository_name, repository, opts = {})
251
+ if @api_client.config.debugging
252
+ @api_client.config.logger.debug 'Calling API: RepositoryApi.update_repository ...'
253
+ end
254
+ # verify the required parameter 'project_name' is set
255
+ if @api_client.config.client_side_validation && project_name.nil?
256
+ fail ArgumentError, "Missing the required parameter 'project_name' when calling RepositoryApi.update_repository"
257
+ end
258
+ # verify the required parameter 'repository_name' is set
259
+ if @api_client.config.client_side_validation && repository_name.nil?
260
+ fail ArgumentError, "Missing the required parameter 'repository_name' when calling RepositoryApi.update_repository"
261
+ end
262
+ # verify the required parameter 'repository' is set
263
+ if @api_client.config.client_side_validation && repository.nil?
264
+ fail ArgumentError, "Missing the required parameter 'repository' when calling RepositoryApi.update_repository"
265
+ end
266
+ if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1
267
+ fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RepositoryApi.update_repository, the character length must be great than or equal to 1.'
268
+ end
269
+
270
+ # resource path
271
+ local_var_path = '/projects/{project_name}/repositories/{repository_name}'.sub('{' + 'project_name' + '}', project_name.to_s).sub('{' + 'repository_name' + '}', repository_name.to_s)
272
+
273
+ # query parameters
274
+ query_params = {}
275
+
276
+ # header parameters
277
+ header_params = {}
278
+ # HTTP header 'Accept' (if needed)
279
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
280
+ # HTTP header 'Content-Type'
281
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
282
+ header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil?
283
+
284
+ # form parameters
285
+ form_params = {}
286
+
287
+ # http body (model)
288
+ post_body = @api_client.object_to_http_body(repository)
289
+ auth_names = ['basic']
290
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
291
+ :header_params => header_params,
292
+ :query_params => query_params,
293
+ :form_params => form_params,
294
+ :body => post_body,
295
+ :auth_names => auth_names)
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug "API called: RepositoryApi#update_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
298
+ end
299
+ return data, status_code, headers
300
+ end
301
+ end
302
+ end