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,247 @@
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 OrgMemberPaginated
18
+ # The total number of items that match with the search.
19
+ attr_accessor :count
20
+
21
+ # The URL or link for the previous page of items.
22
+ attr_accessor :previous
23
+
24
+ # The URL or link for the next page of items.
25
+ attr_accessor :_next
26
+
27
+ # List of accounts.
28
+ attr_accessor :results
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'count' => :'count',
34
+ :'previous' => :'previous',
35
+ :'_next' => :'next',
36
+ :'results' => :'results'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'count' => :'Float',
49
+ :'previous' => :'String',
50
+ :'_next' => :'String',
51
+ :'results' => :'Array<OrgMember>'
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::OrgMemberPaginated` 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::OrgMemberPaginated`. 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?(:'previous')
81
+ self.previous = attributes[:'previous']
82
+ end
83
+
84
+ if attributes.key?(:'_next')
85
+ self._next = attributes[:'_next']
86
+ end
87
+
88
+ if attributes.key?(:'results')
89
+ if (value = attributes[:'results']).is_a?(Array)
90
+ self.results = value
91
+ end
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ count == o.count &&
116
+ previous == o.previous &&
117
+ _next == o._next &&
118
+ results == o.results
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [count, previous, _next, results].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def self._deserialize(type, value)
161
+ case type.to_sym
162
+ when :Time
163
+ Time.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :Boolean
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ # models (e.g. Pet) or oneOf
194
+ klass = DockerHub.const_get(type)
195
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
196
+ end
197
+ end
198
+
199
+ # Returns the string representation of the object
200
+ # @return [String] String presentation of the object
201
+ def to_s
202
+ to_hash.to_s
203
+ end
204
+
205
+ # to_body is an alias to to_hash (backward compatibility)
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_body
208
+ to_hash
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ # Outputs non-array value in the form of hash
228
+ # For object, use to_hash. Otherwise, just return the value
229
+ # @param [Object] value Any valid value
230
+ # @return [Hash] Returns the value in the form of hash
231
+ def _to_hash(value)
232
+ if value.is_a?(Array)
233
+ value.compact.map { |v| _to_hash(v) }
234
+ elsif value.is_a?(Hash)
235
+ {}.tap do |hash|
236
+ value.each { |k, v| hash[k] = _to_hash(v) }
237
+ end
238
+ elsif value.respond_to? :to_hash
239
+ value.to_hash
240
+ else
241
+ value
242
+ end
243
+ end
244
+
245
+ end
246
+
247
+ end
@@ -0,0 +1,214 @@
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 OrgSettings
18
+ attr_accessor :restricted_images
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'restricted_images' => :'restricted_images'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'restricted_images' => :'RestrictedImages'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DockerHub::OrgSettings` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DockerHub::OrgSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'restricted_images')
61
+ self.restricted_images = attributes[:'restricted_images']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ restricted_images == o.restricted_images
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Integer] Hash code
96
+ def hash
97
+ [restricted_images].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def self.build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ attributes = attributes.transform_keys(&:to_sym)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
110
+ elsif type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
+ end
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
118
+ end
119
+ end
120
+ new(transformed_hash)
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def self._deserialize(type, value)
128
+ case type.to_sym
129
+ when :Time
130
+ Time.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :Boolean
140
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
141
+ true
142
+ else
143
+ false
144
+ end
145
+ when :Object
146
+ # generic object (usually a Hash), return directly
147
+ value
148
+ when /\AArray<(?<inner_type>.+)>\z/
149
+ inner_type = Regexp.last_match[:inner_type]
150
+ value.map { |v| _deserialize(inner_type, v) }
151
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
152
+ k_type = Regexp.last_match[:k_type]
153
+ v_type = Regexp.last_match[:v_type]
154
+ {}.tap do |hash|
155
+ value.each do |k, v|
156
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
+ end
158
+ end
159
+ else # model
160
+ # models (e.g. Pet) or oneOf
161
+ klass = DockerHub.const_get(type)
162
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ if value.nil?
185
+ is_nullable = self.class.openapi_nullable.include?(attr)
186
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
+ end
188
+
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,237 @@
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 Page
18
+ # total number of results available across all pages
19
+ attr_accessor :count
20
+
21
+ # link to next page of results if any
22
+ attr_accessor :_next
23
+
24
+ # link to previous page of results if any
25
+ attr_accessor :previous
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'count' => :'count',
31
+ :'_next' => :'next',
32
+ :'previous' => :'previous'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'count' => :'Integer',
45
+ :'_next' => :'String',
46
+ :'previous' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ :'_next',
54
+ :'previous'
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DockerHub::Page` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DockerHub::Page`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'count')
74
+ self.count = attributes[:'count']
75
+ end
76
+
77
+ if attributes.key?(:'_next')
78
+ self._next = attributes[:'_next']
79
+ end
80
+
81
+ if attributes.key?(:'previous')
82
+ self.previous = attributes[:'previous']
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ warn '[DEPRECATED] the `valid?` method is obsolete'
98
+ true
99
+ end
100
+
101
+ # Checks equality by comparing each attribute.
102
+ # @param [Object] Object to be compared
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ count == o.count &&
107
+ _next == o._next &&
108
+ previous == o.previous
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [count, _next, previous].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def self._deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = DockerHub.const_get(type)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end