docker-hub 2.pre.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +268 -0
  4. data/Rakefile +10 -0
  5. data/docker-hub.gemspec +39 -0
  6. data/docs/AccessToken.md +40 -0
  7. data/docs/AccessTokensApi.md +362 -0
  8. data/docs/AuditLog.md +30 -0
  9. data/docs/AuditLogAction.md +22 -0
  10. data/docs/AuditLogActions.md +20 -0
  11. data/docs/AuditLogsApi.md +163 -0
  12. data/docs/AuthCreateAccessTokenRequest.md +20 -0
  13. data/docs/AuthCreateTokenResponse.md +18 -0
  14. data/docs/AuthenticationApiApi.md +204 -0
  15. data/docs/BulkInvite.md +18 -0
  16. data/docs/BulkInviteInviteesInner.md +22 -0
  17. data/docs/Category.md +20 -0
  18. data/docs/CreateAccessTokenRequest.md +22 -0
  19. data/docs/CreateOrgAccessTokenRequest.md +24 -0
  20. data/docs/CreateOrgAccessTokenResponse.md +34 -0
  21. data/docs/EmailAddress.md +26 -0
  22. data/docs/EmailWithUsername.md +28 -0
  23. data/docs/Error.md +22 -0
  24. data/docs/GetAccessTokensResponse.md +26 -0
  25. data/docs/GetAuditActionsResponse.md +18 -0
  26. data/docs/GetAuditLogsResponse.md +18 -0
  27. data/docs/GetOrgAccessTokenResponse.md +32 -0
  28. data/docs/GetOrgAccessTokensResponse.md +24 -0
  29. data/docs/GroupMember.md +38 -0
  30. data/docs/GroupsApi.md +682 -0
  31. data/docs/Image.md +40 -0
  32. data/docs/ImmutableTagsSettings.md +20 -0
  33. data/docs/ImmutableTagsVerifyRequest.md +18 -0
  34. data/docs/ImmutableTagsVerifyResponse.md +18 -0
  35. data/docs/Invite.md +28 -0
  36. data/docs/InvitesApi.md +289 -0
  37. data/docs/Layer.md +22 -0
  38. data/docs/LegacyEmailAddress.md +28 -0
  39. data/docs/ListRepositoriesResponse.md +24 -0
  40. data/docs/OrgAccessToken.md +30 -0
  41. data/docs/OrgAccessTokenResource.md +22 -0
  42. data/docs/OrgAccessTokensApi.md +368 -0
  43. data/docs/OrgGroup.md +26 -0
  44. data/docs/OrgMember.md +52 -0
  45. data/docs/OrgMemberPaginated.md +24 -0
  46. data/docs/OrgSettings.md +18 -0
  47. data/docs/OrgSettingsApi.md +149 -0
  48. data/docs/OrgsApi.md +306 -0
  49. data/docs/Page.md +22 -0
  50. data/docs/PaginatedTags.md +24 -0
  51. data/docs/PatchAccessTokenRequest.md +20 -0
  52. data/docs/PostUsers2FALoginErrorResponse.md +18 -0
  53. data/docs/PostUsersLoginErrorResponse.md +20 -0
  54. data/docs/PostUsersLoginSuccessResponse.md +18 -0
  55. data/docs/ProtobufAny.md +20 -0
  56. data/docs/RepoCreationRequest.md +28 -0
  57. data/docs/RepoPermissions.md +22 -0
  58. data/docs/RepositoriesApi.md +806 -0
  59. data/docs/RepositoryGroup.md +22 -0
  60. data/docs/RepositoryGroupCreationRequest.md +20 -0
  61. data/docs/RepositoryInfo.md +68 -0
  62. data/docs/RepositoryListEntry.md +50 -0
  63. data/docs/RestrictedImages.md +22 -0
  64. data/docs/RpcStatus.md +22 -0
  65. data/docs/ScimApi.md +642 -0
  66. data/docs/ScimEmail.md +22 -0
  67. data/docs/ScimError.md +22 -0
  68. data/docs/ScimGroup.md +20 -0
  69. data/docs/ScimResourceType.md +28 -0
  70. data/docs/ScimSchema.md +26 -0
  71. data/docs/ScimSchemaAttribute.md +34 -0
  72. data/docs/ScimSchemaParentAttribute.md +36 -0
  73. data/docs/ScimServiceProviderConfig.md +34 -0
  74. data/docs/ScimServiceProviderConfigAuthenticationSchemes.md +24 -0
  75. data/docs/ScimServiceProviderConfigBulk.md +22 -0
  76. data/docs/ScimServiceProviderConfigChangePassword.md +18 -0
  77. data/docs/ScimServiceProviderConfigFilter.md +20 -0
  78. data/docs/ScimServiceProviderConfigPatch.md +18 -0
  79. data/docs/ScimServiceProviderConfigSort.md +18 -0
  80. data/docs/ScimUser.md +34 -0
  81. data/docs/ScimUserMeta.md +24 -0
  82. data/docs/ScimUserName.md +20 -0
  83. data/docs/Tag.md +42 -0
  84. data/docs/TeamRepo.md +20 -0
  85. data/docs/UpdateOrgAccessTokenRequest.md +24 -0
  86. data/docs/UpdateOrgAccessTokenResponse.md +32 -0
  87. data/docs/UpdateRepositoryImmutableTagsRequest.md +20 -0
  88. data/docs/User.md +36 -0
  89. data/docs/Users2FALoginRequest.md +20 -0
  90. data/docs/UsersLoginRequest.md +20 -0
  91. data/docs/V2AccessTokensUuidGet200Response.md +40 -0
  92. data/docs/V2InvitesBulkPost202Response.md +18 -0
  93. data/docs/V2InvitesBulkPostRequest.md +26 -0
  94. data/docs/V2OrgsNameSettingsPutRequest.md +18 -0
  95. data/docs/V2OrgsNameSettingsPutRequestRestrictedImages.md +22 -0
  96. data/docs/V2OrgsOrgNameGroupsGet200Response.md +24 -0
  97. data/docs/V2OrgsOrgNameGroupsGroupNameMembersGet200Response.md +24 -0
  98. data/docs/V2OrgsOrgNameGroupsGroupNameMembersPostRequest.md +18 -0
  99. data/docs/V2OrgsOrgNameGroupsGroupNamePatchRequest.md +20 -0
  100. data/docs/V2OrgsOrgNameGroupsPostRequest.md +20 -0
  101. data/docs/V2OrgsOrgNameInvitesGet200Response.md +18 -0
  102. data/docs/V2OrgsOrgNameMembersExportGet200ResponseInner.md +30 -0
  103. data/docs/V2OrgsOrgNameMembersUsernamePutRequest.md +18 -0
  104. data/docs/V2Scim20ResourceTypesGet200Response.md +22 -0
  105. data/docs/V2Scim20ResourceTypesNameGet404Response.md +22 -0
  106. data/docs/V2Scim20SchemasGet200Response.md +22 -0
  107. data/docs/V2Scim20ServiceProviderConfigGet401Response.md +22 -0
  108. data/docs/V2Scim20ServiceProviderConfigGet500Response.md +22 -0
  109. data/docs/V2Scim20UsersGet200Response.md +26 -0
  110. data/docs/V2Scim20UsersGet400Response.md +24 -0
  111. data/docs/V2Scim20UsersGet403Response.md +22 -0
  112. data/docs/V2Scim20UsersIdPutRequest.md +22 -0
  113. data/docs/V2Scim20UsersIdPutRequestName.md +20 -0
  114. data/docs/V2Scim20UsersPost409Response.md +22 -0
  115. data/docs/V2Scim20UsersPostRequest.md +22 -0
  116. data/docs/ValueError.md +20 -0
  117. data/git_push.sh +57 -0
  118. data/lib/docker-hub/api/access_tokens_api.rb +353 -0
  119. data/lib/docker-hub/api/audit_logs_api.rb +169 -0
  120. data/lib/docker-hub/api/authentication_api_api.rb +222 -0
  121. data/lib/docker-hub/api/groups_api.rb +690 -0
  122. data/lib/docker-hub/api/invites_api.rb +282 -0
  123. data/lib/docker-hub/api/org_access_tokens_api.rb +371 -0
  124. data/lib/docker-hub/api/org_settings_api.rb +159 -0
  125. data/lib/docker-hub/api/orgs_api.rb +323 -0
  126. data/lib/docker-hub/api/repositories_api.rb +849 -0
  127. data/lib/docker-hub/api/scim_api.rb +615 -0
  128. data/lib/docker-hub/api_client.rb +394 -0
  129. data/lib/docker-hub/api_error.rb +58 -0
  130. data/lib/docker-hub/configuration.rb +306 -0
  131. data/lib/docker-hub/models/access_token.rb +316 -0
  132. data/lib/docker-hub/models/audit_log.rb +271 -0
  133. data/lib/docker-hub/models/audit_log_action.rb +236 -0
  134. data/lib/docker-hub/models/audit_log_actions.rb +227 -0
  135. data/lib/docker-hub/models/auth_create_access_token_request.rb +240 -0
  136. data/lib/docker-hub/models/auth_create_token_response.rb +216 -0
  137. data/lib/docker-hub/models/bulk_invite.rb +217 -0
  138. data/lib/docker-hub/models/bulk_invite_invitees_inner.rb +234 -0
  139. data/lib/docker-hub/models/category.rb +289 -0
  140. data/lib/docker-hub/models/create_access_token_request.rb +279 -0
  141. data/lib/docker-hub/models/create_org_access_token_request.rb +248 -0
  142. data/lib/docker-hub/models/create_org_access_token_response.rb +298 -0
  143. data/lib/docker-hub/models/email_address.rb +250 -0
  144. data/lib/docker-hub/models/email_with_username.rb +266 -0
  145. data/lib/docker-hub/models/error.rb +234 -0
  146. data/lib/docker-hub/models/get_access_tokens_response.rb +252 -0
  147. data/lib/docker-hub/models/get_audit_actions_response.rb +218 -0
  148. data/lib/docker-hub/models/get_audit_logs_response.rb +218 -0
  149. data/lib/docker-hub/models/get_org_access_token_response.rb +289 -0
  150. data/lib/docker-hub/models/get_org_access_tokens_response.rb +243 -0
  151. data/lib/docker-hub/models/group_member.rb +339 -0
  152. data/lib/docker-hub/models/image.rb +363 -0
  153. data/lib/docker-hub/models/immutable_tags_settings.rb +241 -0
  154. data/lib/docker-hub/models/immutable_tags_verify_request.rb +243 -0
  155. data/lib/docker-hub/models/immutable_tags_verify_response.rb +224 -0
  156. data/lib/docker-hub/models/invite.rb +263 -0
  157. data/lib/docker-hub/models/layer.rb +236 -0
  158. data/lib/docker-hub/models/legacy_email_address.rb +266 -0
  159. data/lib/docker-hub/models/list_repositories_response.rb +255 -0
  160. data/lib/docker-hub/models/org_access_token.rb +270 -0
  161. data/lib/docker-hub/models/org_access_token_resource.rb +271 -0
  162. data/lib/docker-hub/models/org_group.rb +255 -0
  163. data/lib/docker-hub/models/org_member.rb +431 -0
  164. data/lib/docker-hub/models/org_member_paginated.rb +247 -0
  165. data/lib/docker-hub/models/org_settings.rb +214 -0
  166. data/lib/docker-hub/models/page.rb +237 -0
  167. data/lib/docker-hub/models/paginated_tags.rb +255 -0
  168. data/lib/docker-hub/models/patch_access_token_request.rb +251 -0
  169. data/lib/docker-hub/models/post_users2_fa_login_error_response.rb +216 -0
  170. data/lib/docker-hub/models/post_users_login_error_response.rb +234 -0
  171. data/lib/docker-hub/models/post_users_login_success_response.rb +216 -0
  172. data/lib/docker-hub/models/protobuf_any.rb +223 -0
  173. data/lib/docker-hub/models/repo_creation_request.rb +358 -0
  174. data/lib/docker-hub/models/repo_permissions.rb +256 -0
  175. data/lib/docker-hub/models/repository_group.rb +269 -0
  176. data/lib/docker-hub/models/repository_group_creation_request.rb +273 -0
  177. data/lib/docker-hub/models/repository_info.rb +609 -0
  178. data/lib/docker-hub/models/repository_list_entry.rb +488 -0
  179. data/lib/docker-hub/models/restricted_images.rb +235 -0
  180. data/lib/docker-hub/models/rpc_status.rb +234 -0
  181. data/lib/docker-hub/models/scim_email.rb +232 -0
  182. data/lib/docker-hub/models/scim_error.rb +236 -0
  183. data/lib/docker-hub/models/scim_group.rb +223 -0
  184. data/lib/docker-hub/models/scim_resource_type.rb +261 -0
  185. data/lib/docker-hub/models/scim_schema.rb +254 -0
  186. data/lib/docker-hub/models/scim_schema_attribute.rb +320 -0
  187. data/lib/docker-hub/models/scim_schema_parent_attribute.rb +338 -0
  188. data/lib/docker-hub/models/scim_service_provider_config.rb +288 -0
  189. data/lib/docker-hub/models/scim_service_provider_config_authentication_schemes.rb +241 -0
  190. data/lib/docker-hub/models/scim_service_provider_config_bulk.rb +232 -0
  191. data/lib/docker-hub/models/scim_service_provider_config_change_password.rb +214 -0
  192. data/lib/docker-hub/models/scim_service_provider_config_filter.rb +223 -0
  193. data/lib/docker-hub/models/scim_service_provider_config_patch.rb +214 -0
  194. data/lib/docker-hub/models/scim_service_provider_config_sort.rb +214 -0
  195. data/lib/docker-hub/models/scim_user.rb +295 -0
  196. data/lib/docker-hub/models/scim_user_meta.rb +243 -0
  197. data/lib/docker-hub/models/scim_user_name.rb +223 -0
  198. data/lib/docker-hub/models/tag.rb +371 -0
  199. data/lib/docker-hub/models/team_repo.rb +244 -0
  200. data/lib/docker-hub/models/update_org_access_token_request.rb +247 -0
  201. data/lib/docker-hub/models/update_org_access_token_response.rb +289 -0
  202. data/lib/docker-hub/models/update_repository_immutable_tags_request.rb +241 -0
  203. data/lib/docker-hub/models/user.rb +330 -0
  204. data/lib/docker-hub/models/users2_fa_login_request.rb +240 -0
  205. data/lib/docker-hub/models/users_login_request.rb +240 -0
  206. data/lib/docker-hub/models/v2_access_tokens_uuid_get200_response.rb +323 -0
  207. data/lib/docker-hub/models/v2_invites_bulk_post202_response.rb +214 -0
  208. data/lib/docker-hub/models/v2_invites_bulk_post_request.rb +271 -0
  209. data/lib/docker-hub/models/v2_orgs_name_settings_put_request.rb +221 -0
  210. data/lib/docker-hub/models/v2_orgs_name_settings_put_request_restricted_images.rb +263 -0
  211. data/lib/docker-hub/models/v2_orgs_org_name_groups_get200_response.rb +243 -0
  212. data/lib/docker-hub/models/v2_orgs_org_name_groups_group_name_members_get200_response.rb +243 -0
  213. data/lib/docker-hub/models/v2_orgs_org_name_groups_group_name_members_post_request.rb +221 -0
  214. data/lib/docker-hub/models/v2_orgs_org_name_groups_group_name_patch_request.rb +223 -0
  215. data/lib/docker-hub/models/v2_orgs_org_name_groups_post_request.rb +230 -0
  216. data/lib/docker-hub/models/v2_orgs_org_name_invites_get200_response.rb +216 -0
  217. data/lib/docker-hub/models/v2_orgs_org_name_members_export_get200_response_inner.rb +356 -0
  218. data/lib/docker-hub/models/v2_orgs_org_name_members_username_put_request.rb +256 -0
  219. data/lib/docker-hub/models/v2_scim20_resource_types_get200_response.rb +236 -0
  220. data/lib/docker-hub/models/v2_scim20_resource_types_name_get404_response.rb +243 -0
  221. data/lib/docker-hub/models/v2_scim20_schemas_get200_response.rb +236 -0
  222. data/lib/docker-hub/models/v2_scim20_service_provider_config_get401_response.rb +243 -0
  223. data/lib/docker-hub/models/v2_scim20_service_provider_config_get500_response.rb +243 -0
  224. data/lib/docker-hub/models/v2_scim20_users_get200_response.rb +254 -0
  225. data/lib/docker-hub/models/v2_scim20_users_get400_response.rb +253 -0
  226. data/lib/docker-hub/models/v2_scim20_users_get403_response.rb +243 -0
  227. data/lib/docker-hub/models/v2_scim20_users_id_put_request.rb +244 -0
  228. data/lib/docker-hub/models/v2_scim20_users_id_put_request_name.rb +230 -0
  229. data/lib/docker-hub/models/v2_scim20_users_post409_response.rb +243 -0
  230. data/lib/docker-hub/models/v2_scim20_users_post_request.rb +249 -0
  231. data/lib/docker-hub/models/value_error.rb +226 -0
  232. data/lib/docker-hub/version.rb +15 -0
  233. data/lib/docker-hub.rb +150 -0
  234. data/spec/api/access_tokens_api_spec.rb +97 -0
  235. data/spec/api/audit_logs_api_spec.rb +66 -0
  236. data/spec/api/authentication_api_api_spec.rb +71 -0
  237. data/spec/api/groups_api_spec.rb +162 -0
  238. data/spec/api/invites_api_spec.rb +84 -0
  239. data/spec/api/org_access_tokens_api_spec.rb +100 -0
  240. data/spec/api/org_settings_api_spec.rb +60 -0
  241. data/spec/api/orgs_api_spec.rb +92 -0
  242. data/spec/api/repositories_api_spec.rb +183 -0
  243. data/spec/api/scim_api_spec.rb +146 -0
  244. data/spec/models/access_token_spec.rb +102 -0
  245. data/spec/models/audit_log_action_spec.rb +48 -0
  246. data/spec/models/audit_log_actions_spec.rb +42 -0
  247. data/spec/models/audit_log_spec.rb +72 -0
  248. data/spec/models/auth_create_access_token_request_spec.rb +42 -0
  249. data/spec/models/auth_create_token_response_spec.rb +36 -0
  250. data/spec/models/bulk_invite_invitees_inner_spec.rb +48 -0
  251. data/spec/models/bulk_invite_spec.rb +36 -0
  252. data/spec/models/category_spec.rb +42 -0
  253. data/spec/models/create_access_token_request_spec.rb +48 -0
  254. data/spec/models/create_org_access_token_request_spec.rb +54 -0
  255. data/spec/models/create_org_access_token_response_spec.rb +84 -0
  256. data/spec/models/email_address_spec.rb +60 -0
  257. data/spec/models/email_with_username_spec.rb +66 -0
  258. data/spec/models/error_spec.rb +48 -0
  259. data/spec/models/get_access_tokens_response_spec.rb +60 -0
  260. data/spec/models/get_audit_actions_response_spec.rb +36 -0
  261. data/spec/models/get_audit_logs_response_spec.rb +36 -0
  262. data/spec/models/get_org_access_token_response_spec.rb +78 -0
  263. data/spec/models/get_org_access_tokens_response_spec.rb +54 -0
  264. data/spec/models/group_member_spec.rb +100 -0
  265. data/spec/models/image_spec.rb +106 -0
  266. data/spec/models/immutable_tags_settings_spec.rb +42 -0
  267. data/spec/models/immutable_tags_verify_request_spec.rb +36 -0
  268. data/spec/models/immutable_tags_verify_response_spec.rb +36 -0
  269. data/spec/models/invite_spec.rb +66 -0
  270. data/spec/models/layer_spec.rb +48 -0
  271. data/spec/models/legacy_email_address_spec.rb +66 -0
  272. data/spec/models/list_repositories_response_spec.rb +54 -0
  273. data/spec/models/org_access_token_resource_spec.rb +52 -0
  274. data/spec/models/org_access_token_spec.rb +72 -0
  275. data/spec/models/org_group_spec.rb +60 -0
  276. data/spec/models/org_member_paginated_spec.rb +54 -0
  277. data/spec/models/org_member_spec.rb +146 -0
  278. data/spec/models/org_settings_spec.rb +36 -0
  279. data/spec/models/page_spec.rb +48 -0
  280. data/spec/models/paginated_tags_spec.rb +54 -0
  281. data/spec/models/patch_access_token_request_spec.rb +42 -0
  282. data/spec/models/post_users2_fa_login_error_response_spec.rb +36 -0
  283. data/spec/models/post_users_login_error_response_spec.rb +42 -0
  284. data/spec/models/post_users_login_success_response_spec.rb +36 -0
  285. data/spec/models/protobuf_any_spec.rb +42 -0
  286. data/spec/models/repo_creation_request_spec.rb +66 -0
  287. data/spec/models/repo_permissions_spec.rb +48 -0
  288. data/spec/models/repository_group_creation_request_spec.rb +46 -0
  289. data/spec/models/repository_group_spec.rb +52 -0
  290. data/spec/models/repository_info_spec.rb +186 -0
  291. data/spec/models/repository_list_entry_spec.rb +140 -0
  292. data/spec/models/restricted_images_spec.rb +48 -0
  293. data/spec/models/rpc_status_spec.rb +48 -0
  294. data/spec/models/scim_email_spec.rb +48 -0
  295. data/spec/models/scim_error_spec.rb +48 -0
  296. data/spec/models/scim_group_spec.rb +42 -0
  297. data/spec/models/scim_resource_type_spec.rb +66 -0
  298. data/spec/models/scim_schema_attribute_spec.rb +88 -0
  299. data/spec/models/scim_schema_parent_attribute_spec.rb +94 -0
  300. data/spec/models/scim_schema_spec.rb +60 -0
  301. data/spec/models/scim_service_provider_config_authentication_schemes_spec.rb +54 -0
  302. data/spec/models/scim_service_provider_config_bulk_spec.rb +48 -0
  303. data/spec/models/scim_service_provider_config_change_password_spec.rb +36 -0
  304. data/spec/models/scim_service_provider_config_filter_spec.rb +42 -0
  305. data/spec/models/scim_service_provider_config_patch_spec.rb +36 -0
  306. data/spec/models/scim_service_provider_config_sort_spec.rb +36 -0
  307. data/spec/models/scim_service_provider_config_spec.rb +84 -0
  308. data/spec/models/scim_user_meta_spec.rb +54 -0
  309. data/spec/models/scim_user_name_spec.rb +42 -0
  310. data/spec/models/scim_user_spec.rb +84 -0
  311. data/spec/models/tag_spec.rb +112 -0
  312. data/spec/models/team_repo_spec.rb +46 -0
  313. data/spec/models/update_org_access_token_request_spec.rb +54 -0
  314. data/spec/models/update_org_access_token_response_spec.rb +78 -0
  315. data/spec/models/update_repository_immutable_tags_request_spec.rb +42 -0
  316. data/spec/models/user_spec.rb +94 -0
  317. data/spec/models/users2_fa_login_request_spec.rb +42 -0
  318. data/spec/models/users_login_request_spec.rb +42 -0
  319. data/spec/models/v2_access_tokens_uuid_get200_response_spec.rb +102 -0
  320. data/spec/models/v2_invites_bulk_post202_response_spec.rb +36 -0
  321. data/spec/models/v2_invites_bulk_post_request_spec.rb +60 -0
  322. data/spec/models/v2_orgs_name_settings_put_request_restricted_images_spec.rb +48 -0
  323. data/spec/models/v2_orgs_name_settings_put_request_spec.rb +36 -0
  324. data/spec/models/v2_orgs_org_name_groups_get200_response_spec.rb +54 -0
  325. data/spec/models/v2_orgs_org_name_groups_group_name_members_get200_response_spec.rb +54 -0
  326. data/spec/models/v2_orgs_org_name_groups_group_name_members_post_request_spec.rb +36 -0
  327. data/spec/models/v2_orgs_org_name_groups_group_name_patch_request_spec.rb +42 -0
  328. data/spec/models/v2_orgs_org_name_groups_post_request_spec.rb +42 -0
  329. data/spec/models/v2_orgs_org_name_invites_get200_response_spec.rb +36 -0
  330. data/spec/models/v2_orgs_org_name_members_export_get200_response_inner_spec.rb +80 -0
  331. data/spec/models/v2_orgs_org_name_members_username_put_request_spec.rb +40 -0
  332. data/spec/models/v2_scim20_resource_types_get200_response_spec.rb +48 -0
  333. data/spec/models/v2_scim20_resource_types_name_get404_response_spec.rb +48 -0
  334. data/spec/models/v2_scim20_schemas_get200_response_spec.rb +48 -0
  335. data/spec/models/v2_scim20_service_provider_config_get401_response_spec.rb +48 -0
  336. data/spec/models/v2_scim20_service_provider_config_get500_response_spec.rb +48 -0
  337. data/spec/models/v2_scim20_users_get200_response_spec.rb +60 -0
  338. data/spec/models/v2_scim20_users_get400_response_spec.rb +54 -0
  339. data/spec/models/v2_scim20_users_get403_response_spec.rb +48 -0
  340. data/spec/models/v2_scim20_users_id_put_request_name_spec.rb +42 -0
  341. data/spec/models/v2_scim20_users_id_put_request_spec.rb +48 -0
  342. data/spec/models/v2_scim20_users_post409_response_spec.rb +48 -0
  343. data/spec/models/v2_scim20_users_post_request_spec.rb +48 -0
  344. data/spec/models/value_error_spec.rb +42 -0
  345. data/spec/spec_helper.rb +111 -0
  346. metadata +539 -0
@@ -0,0 +1,234 @@
1
+ =begin
2
+ #Docker HUB API
3
+
4
+ #Docker Hub is a service provided by Docker for finding and sharing container images with your team. It is the world's largest library and community for container images. In addition to the [Docker Hub UI](https://docs.docker.com/docker-hub/) and [Docker Hub CLI tool](https://github.com/docker/hub-tool#readme) (currently experimental), Docker provides an API that allows you to interact with Docker Hub. Browse through the Docker Hub API documentation to explore the supported endpoints.
5
+
6
+ The version of the OpenAPI document: 2-beta
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DockerHub
17
+ class Error
18
+ attr_accessor :errinfo
19
+
20
+ attr_accessor :detail
21
+
22
+ attr_accessor :message
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'errinfo' => :'errinfo',
28
+ :'detail' => :'detail',
29
+ :'message' => :'message'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'errinfo' => :'Array<String>',
42
+ :'detail' => :'String',
43
+ :'message' => :'String'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DockerHub::Error` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DockerHub::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'errinfo')
69
+ if (value = attributes[:'errinfo']).is_a?(Array)
70
+ self.errinfo = value
71
+ end
72
+ end
73
+
74
+ if attributes.key?(:'detail')
75
+ self.detail = attributes[:'detail']
76
+ end
77
+
78
+ if attributes.key?(:'message')
79
+ self.message = attributes[:'message']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ errinfo == o.errinfo &&
104
+ detail == o.detail &&
105
+ message == o.message
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [errinfo, detail, message].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ transformed_hash = {}
127
+ openapi_types.each_pair do |key, type|
128
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
135
+ end
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
138
+ end
139
+ end
140
+ new(transformed_hash)
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def self._deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = DockerHub.const_get(type)
182
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Docker HUB API
3
+
4
+ #Docker Hub is a service provided by Docker for finding and sharing container images with your team. It is the world's largest library and community for container images. In addition to the [Docker Hub UI](https://docs.docker.com/docker-hub/) and [Docker Hub CLI tool](https://github.com/docker/hub-tool#readme) (currently experimental), Docker provides an API that allows you to interact with Docker Hub. Browse through the Docker Hub API documentation to explore the supported endpoints.
5
+
6
+ The version of the OpenAPI document: 2-beta
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DockerHub
17
+ class GetAccessTokensResponse
18
+ attr_accessor :count
19
+
20
+ attr_accessor :_next
21
+
22
+ attr_accessor :previous
23
+
24
+ attr_accessor :active_count
25
+
26
+ attr_accessor :results
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'count' => :'count',
32
+ :'_next' => :'next',
33
+ :'previous' => :'previous',
34
+ :'active_count' => :'active_count',
35
+ :'results' => :'results'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'count' => :'Float',
48
+ :'_next' => :'String',
49
+ :'previous' => :'String',
50
+ :'active_count' => :'Float',
51
+ :'results' => :'Array<V2AccessTokensUuidGet200Response>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DockerHub::GetAccessTokensResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DockerHub::GetAccessTokensResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'count')
77
+ self.count = attributes[:'count']
78
+ end
79
+
80
+ if attributes.key?(:'_next')
81
+ self._next = attributes[:'_next']
82
+ end
83
+
84
+ if attributes.key?(:'previous')
85
+ self.previous = attributes[:'previous']
86
+ end
87
+
88
+ if attributes.key?(:'active_count')
89
+ self.active_count = attributes[:'active_count']
90
+ end
91
+
92
+ if attributes.key?(:'results')
93
+ if (value = attributes[:'results']).is_a?(Array)
94
+ self.results = value
95
+ end
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ count == o.count &&
120
+ _next == o._next &&
121
+ previous == o.previous &&
122
+ active_count == o.active_count &&
123
+ results == o.results
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [count, _next, previous, active_count, results].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def self._deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = DockerHub.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #Docker HUB API
3
+
4
+ #Docker Hub is a service provided by Docker for finding and sharing container images with your team. It is the world's largest library and community for container images. In addition to the [Docker Hub UI](https://docs.docker.com/docker-hub/) and [Docker Hub CLI tool](https://github.com/docker/hub-tool#readme) (currently experimental), Docker provides an API that allows you to interact with Docker Hub. Browse through the Docker Hub API documentation to explore the supported endpoints.
5
+
6
+ The version of the OpenAPI document: 2-beta
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DockerHub
17
+ # GetAuditActions response.
18
+ class GetAuditActionsResponse
19
+ # Map of audit log actions.
20
+ attr_accessor :actions
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'actions' => :'actions'
26
+ }
27
+ end
28
+
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'actions' => :'Hash<String, AuditLogActions>'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DockerHub::GetAuditActionsResponse` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DockerHub::GetAuditActionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'actions')
63
+ if (value = attributes[:'actions']).is_a?(Hash)
64
+ self.actions = value
65
+ end
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ warn '[DEPRECATED] the `valid?` method is obsolete'
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ actions == o.actions
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(o)
95
+ self == o
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ def hash
101
+ [actions].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def self.build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ attributes = attributes.transform_keys(&:to_sym)
110
+ transformed_hash = {}
111
+ openapi_types.each_pair do |key, type|
112
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
113
+ transformed_hash["#{key}"] = nil
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[attribute_map[key]].is_a?(Array)
118
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
+ end
120
+ elsif !attributes[attribute_map[key]].nil?
121
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
+ end
123
+ end
124
+ new(transformed_hash)
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def self._deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = DockerHub.const_get(type)
166
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end