phrase 0.4.31 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (663) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +6 -0
  3. data/LICENSE +17 -18
  4. data/README.md +449 -280
  5. data/Rakefile +7 -4
  6. data/docs/Account.md +27 -0
  7. data/docs/AccountDetails.md +27 -0
  8. data/docs/AccountDetails1.md +17 -0
  9. data/docs/AccountsApi.md +134 -0
  10. data/docs/AffectedCount.md +17 -0
  11. data/docs/AffectedResources.md +17 -0
  12. data/docs/Authorization.md +31 -0
  13. data/docs/AuthorizationCreateParameters.md +21 -0
  14. data/docs/AuthorizationUpdateParameters.md +21 -0
  15. data/docs/AuthorizationWithToken.md +33 -0
  16. data/docs/AuthorizationWithToken1.md +17 -0
  17. data/docs/AuthorizationsApi.md +321 -0
  18. data/docs/BitbucketSync.md +27 -0
  19. data/docs/BitbucketSyncApi.md +197 -0
  20. data/docs/BitbucketSyncExportParameters.md +17 -0
  21. data/docs/BitbucketSyncExportResponse.md +17 -0
  22. data/docs/BitbucketSyncImportParameters.md +17 -0
  23. data/docs/BlacklistedKey.md +23 -0
  24. data/docs/BlacklistedKeyCreateParameters.md +17 -0
  25. data/docs/BlacklistedKeyUpdateParameters.md +17 -0
  26. data/docs/BlacklistedKeysApi.md +333 -0
  27. data/docs/Branch.md +29 -0
  28. data/docs/BranchCreateParameters.md +17 -0
  29. data/docs/BranchMergeParameters.md +17 -0
  30. data/docs/BranchUpdateParameters.md +17 -0
  31. data/docs/BranchesApi.md +459 -0
  32. data/docs/Comment.md +25 -0
  33. data/docs/CommentCreateParameters.md +19 -0
  34. data/docs/CommentMarkReadParameters.md +17 -0
  35. data/docs/CommentUpdateParameters.md +19 -0
  36. data/docs/CommentsApi.md +548 -0
  37. data/docs/Distribution.md +29 -0
  38. data/docs/DistributionCreateParameters.md +29 -0
  39. data/docs/DistributionPreview.md +29 -0
  40. data/docs/DistributionUpdateParameters.md +29 -0
  41. data/docs/DistributionsApi.md +331 -0
  42. data/docs/Document.md +23 -0
  43. data/docs/DocumentsApi.md +137 -0
  44. data/docs/Format.md +35 -0
  45. data/docs/FormatsApi.md +68 -0
  46. data/docs/GitHubSyncApi.md +130 -0
  47. data/docs/GitLabSyncApi.md +463 -0
  48. data/docs/GithubSyncExportParameters.md +17 -0
  49. data/docs/GithubSyncImportParameters.md +17 -0
  50. data/docs/GitlabSync.md +37 -0
  51. data/docs/GitlabSyncExport.md +19 -0
  52. data/docs/GitlabSyncExportParameters.md +17 -0
  53. data/docs/GitlabSyncHistory.md +25 -0
  54. data/docs/GitlabSyncImportParameters.md +17 -0
  55. data/docs/GlossariesApi.md +331 -0
  56. data/docs/Glossary.md +25 -0
  57. data/docs/GlossaryCreateParameters.md +21 -0
  58. data/docs/GlossaryTerm.md +31 -0
  59. data/docs/GlossaryTermCreateParameters.md +23 -0
  60. data/docs/GlossaryTermTranslation.md +25 -0
  61. data/docs/GlossaryTermTranslationCreateParameters.md +19 -0
  62. data/docs/GlossaryTermTranslationUpdateParameters.md +19 -0
  63. data/docs/GlossaryTermTranslationsApi.md +213 -0
  64. data/docs/GlossaryTermUpdateParameters.md +23 -0
  65. data/docs/GlossaryTermsApi.md +341 -0
  66. data/docs/GlossaryUpdateParameters.md +21 -0
  67. data/docs/InlineResponse422.md +19 -0
  68. data/docs/InlineResponse422Errors.md +21 -0
  69. data/docs/Invitation.md +35 -0
  70. data/docs/InvitationCreateParameters.md +25 -0
  71. data/docs/InvitationUpdateParameters.md +23 -0
  72. data/docs/InvitationsApi.md +395 -0
  73. data/docs/Job.md +29 -0
  74. data/docs/JobCompleteParameters.md +17 -0
  75. data/docs/JobCreateParameters.md +27 -0
  76. data/docs/JobDetails.md +37 -0
  77. data/docs/JobDetails1.md +23 -0
  78. data/docs/JobKeysCreateParameters.md +19 -0
  79. data/docs/JobLocale.md +23 -0
  80. data/docs/JobLocaleCompleteParameters.md +17 -0
  81. data/docs/JobLocaleReopenParameters.md +17 -0
  82. data/docs/JobLocaleUpdateParameters.md +21 -0
  83. data/docs/JobLocalesApi.md +483 -0
  84. data/docs/JobLocalesCreateParameters.md +21 -0
  85. data/docs/JobPreview.md +21 -0
  86. data/docs/JobReopenParameters.md +17 -0
  87. data/docs/JobStartParameters.md +17 -0
  88. data/docs/JobUpdateParameters.md +23 -0
  89. data/docs/JobsApi.md +674 -0
  90. data/docs/KeyCreateParameters.md +45 -0
  91. data/docs/KeyPreview.md +21 -0
  92. data/docs/KeyUpdateParameters.md +45 -0
  93. data/docs/KeysApi.md +609 -0
  94. data/docs/KeysSearchParameters.md +25 -0
  95. data/docs/KeysTagParameters.md +23 -0
  96. data/docs/KeysUntagParameters.md +23 -0
  97. data/docs/Locale.md +35 -0
  98. data/docs/LocaleCreateParameters.md +35 -0
  99. data/docs/LocaleDetails.md +37 -0
  100. data/docs/LocaleDetails1.md +17 -0
  101. data/docs/LocalePreview.md +21 -0
  102. data/docs/LocaleStatistics.md +29 -0
  103. data/docs/LocaleUpdateParameters.md +35 -0
  104. data/docs/LocalesApi.md +428 -0
  105. data/docs/Member.md +25 -0
  106. data/docs/MemberUpdateParameters.md +23 -0
  107. data/docs/MembersApi.md +267 -0
  108. data/docs/OrderConfirmParameters.md +17 -0
  109. data/docs/OrderCreateParameters.md +43 -0
  110. data/docs/OrdersApi.md +337 -0
  111. data/docs/Project.md +31 -0
  112. data/docs/ProjectCreateParameters.md +29 -0
  113. data/docs/ProjectDetails.md +33 -0
  114. data/docs/ProjectDetails1.md +19 -0
  115. data/docs/ProjectLocales.md +27 -0
  116. data/docs/ProjectLocales1.md +17 -0
  117. data/docs/ProjectShort.md +25 -0
  118. data/docs/ProjectUpdateParameters.md +27 -0
  119. data/docs/ProjectsApi.md +321 -0
  120. data/docs/Release.md +37 -0
  121. data/docs/ReleaseCreateParameters.md +21 -0
  122. data/docs/ReleasePreview.md +37 -0
  123. data/docs/ReleaseUpdateParameters.md +21 -0
  124. data/docs/ReleasesApi.md +407 -0
  125. data/docs/Screenshot.md +29 -0
  126. data/docs/ScreenshotCreateParameters.md +21 -0
  127. data/docs/ScreenshotMarker.md +27 -0
  128. data/docs/ScreenshotMarkerCreateParameters.md +19 -0
  129. data/docs/ScreenshotMarkerUpdateParameters.md +19 -0
  130. data/docs/ScreenshotMarkersApi.md +337 -0
  131. data/docs/ScreenshotUpdateParameters.md +21 -0
  132. data/docs/ScreenshotsApi.md +331 -0
  133. data/docs/Space.md +27 -0
  134. data/docs/SpaceCreateParameters.md +17 -0
  135. data/docs/SpaceUpdateParameters.md +17 -0
  136. data/docs/SpacesApi.md +529 -0
  137. data/docs/SpacesProjectsCreateParameters.md +17 -0
  138. data/docs/StyleGuidesApi.md +331 -0
  139. data/docs/Styleguide.md +23 -0
  140. data/docs/StyleguideCreateParameters.md +41 -0
  141. data/docs/StyleguideDetails.md +49 -0
  142. data/docs/StyleguideDetails1.md +41 -0
  143. data/docs/StyleguidePreview.md +19 -0
  144. data/docs/StyleguideUpdateParameters.md +41 -0
  145. data/docs/Tag.md +23 -0
  146. data/docs/TagCreateParameters.md +19 -0
  147. data/docs/TagWithStats.md +25 -0
  148. data/docs/TagWithStats1.md +17 -0
  149. data/docs/TagWithStats1Statistics.md +23 -0
  150. data/docs/TagWithStats1Statistics1.md +19 -0
  151. data/docs/TagsApi.md +271 -0
  152. data/docs/Team.md +29 -0
  153. data/docs/TeamCreateParameters.md +17 -0
  154. data/docs/TeamDetail.md +29 -0
  155. data/docs/TeamUpdateParameters.md +17 -0
  156. data/docs/TeamsApi.md +721 -0
  157. data/docs/TeamsProjectsCreateParameters.md +17 -0
  158. data/docs/TeamsSpacesCreateParameters.md +17 -0
  159. data/docs/TeamsUsersCreateParameters.md +17 -0
  160. data/docs/Translation.md +37 -0
  161. data/docs/TranslationCreateParameters.md +31 -0
  162. data/docs/TranslationDetails.md +41 -0
  163. data/docs/TranslationDetails1.md +19 -0
  164. data/docs/TranslationExcludeParameters.md +17 -0
  165. data/docs/TranslationIncludeParameters.md +17 -0
  166. data/docs/TranslationKey.md +33 -0
  167. data/docs/TranslationKeyDetails.md +51 -0
  168. data/docs/TranslationKeyDetails1.md +33 -0
  169. data/docs/TranslationOrder.md +49 -0
  170. data/docs/TranslationReviewParameters.md +17 -0
  171. data/docs/TranslationUnverifyParameters.md +17 -0
  172. data/docs/TranslationUpdateParameters.md +27 -0
  173. data/docs/TranslationVerifyParameters.md +17 -0
  174. data/docs/TranslationVersion.md +31 -0
  175. data/docs/TranslationVersionWithUser.md +33 -0
  176. data/docs/TranslationVersionWithUser1.md +17 -0
  177. data/docs/TranslationsApi.md +1148 -0
  178. data/docs/TranslationsExcludeParameters.md +23 -0
  179. data/docs/TranslationsIncludeParameters.md +23 -0
  180. data/docs/TranslationsReviewParameters.md +19 -0
  181. data/docs/TranslationsSearchParameters.md +23 -0
  182. data/docs/TranslationsUnverifyParameters.md +23 -0
  183. data/docs/TranslationsVerifyParameters.md +23 -0
  184. data/docs/Upload.md +31 -0
  185. data/docs/UploadCreateParameters.md +45 -0
  186. data/docs/UploadSummary.md +31 -0
  187. data/docs/UploadsApi.md +234 -0
  188. data/docs/User.md +29 -0
  189. data/docs/UserPreview.md +21 -0
  190. data/docs/UsersApi.md +68 -0
  191. data/docs/VersionsHistoryApi.md +146 -0
  192. data/docs/Webhook.md +29 -0
  193. data/docs/WebhookCreateParameters.md +23 -0
  194. data/docs/WebhookUpdateParameters.md +23 -0
  195. data/docs/WebhooksApi.md +394 -0
  196. data/git_push.sh +58 -0
  197. data/lib/phrase.rb +212 -55
  198. data/lib/phrase/api/accounts_api.rb +142 -0
  199. data/lib/phrase/api/authorizations_api.rb +348 -0
  200. data/lib/phrase/api/bitbucket_sync_api.rb +219 -0
  201. data/lib/phrase/api/blacklisted_keys_api.rb +381 -0
  202. data/lib/phrase/api/branches_api.rb +526 -0
  203. data/lib/phrase/api/comments_api.rb +659 -0
  204. data/lib/phrase/api/distributions_api.rb +378 -0
  205. data/lib/phrase/api/documents_api.rb +152 -0
  206. data/lib/phrase/api/formats_api.rb +70 -0
  207. data/lib/phrase/api/git_hub_sync_api.rb +146 -0
  208. data/lib/phrase/api/git_lab_sync_api.rb +510 -0
  209. data/lib/phrase/api/glossaries_api.rb +378 -0
  210. data/lib/phrase/api/glossary_term_translations_api.rb +270 -0
  211. data/lib/phrase/api/glossary_terms_api.rb +408 -0
  212. data/lib/phrase/api/invitations_api.rb +450 -0
  213. data/lib/phrase/api/job_locales_api.rb +589 -0
  214. data/lib/phrase/api/jobs_api.rb +792 -0
  215. data/lib/phrase/api/keys_api.rb +702 -0
  216. data/lib/phrase/api/locales_api.rb +499 -0
  217. data/lib/phrase/api/members_api.rb +304 -0
  218. data/lib/phrase/api/orders_api.rb +387 -0
  219. data/lib/phrase/api/projects_api.rb +348 -0
  220. data/lib/phrase/api/releases_api.rb +486 -0
  221. data/lib/phrase/api/screenshot_markers_api.rb +396 -0
  222. data/lib/phrase/api/screenshots_api.rb +378 -0
  223. data/lib/phrase/api/spaces_api.rb +610 -0
  224. data/lib/phrase/api/style_guides_api.rb +378 -0
  225. data/lib/phrase/api/tags_api.rb +307 -0
  226. data/lib/phrase/api/teams_api.rb +840 -0
  227. data/lib/phrase/api/translations_api.rb +1353 -0
  228. data/lib/phrase/api/uploads_api.rb +273 -0
  229. data/lib/phrase/api/users_api.rb +70 -0
  230. data/lib/phrase/api/versions_history_api.rb +172 -0
  231. data/lib/phrase/api/webhooks_api.rb +448 -0
  232. data/lib/phrase/api_client.rb +376 -0
  233. data/lib/phrase/api_error.rb +45 -0
  234. data/lib/phrase/configuration.rb +243 -0
  235. data/lib/phrase/models/account.rb +239 -0
  236. data/lib/phrase/models/account_details.rb +247 -0
  237. data/lib/phrase/models/account_details1.rb +194 -0
  238. data/lib/phrase/models/affected_count.rb +194 -0
  239. data/lib/phrase/models/affected_resources.rb +194 -0
  240. data/lib/phrase/models/authorization.rb +259 -0
  241. data/lib/phrase/models/authorization_create_parameters.rb +217 -0
  242. data/lib/phrase/models/authorization_update_parameters.rb +217 -0
  243. data/lib/phrase/models/authorization_with_token.rb +276 -0
  244. data/lib/phrase/models/authorization_with_token1.rb +194 -0
  245. data/lib/phrase/models/bitbucket_sync.rb +241 -0
  246. data/lib/phrase/models/bitbucket_sync_export_parameters.rb +195 -0
  247. data/lib/phrase/models/bitbucket_sync_export_response.rb +194 -0
  248. data/lib/phrase/models/bitbucket_sync_import_parameters.rb +195 -0
  249. data/lib/phrase/models/blacklisted_key.rb +221 -0
  250. data/lib/phrase/models/blacklisted_key_create_parameters.rb +195 -0
  251. data/lib/phrase/models/blacklisted_key_update_parameters.rb +195 -0
  252. data/lib/phrase/models/branch.rb +248 -0
  253. data/lib/phrase/models/branch_create_parameters.rb +195 -0
  254. data/lib/phrase/models/branch_merge_parameters.rb +195 -0
  255. data/lib/phrase/models/branch_update_parameters.rb +195 -0
  256. data/lib/phrase/models/comment.rb +230 -0
  257. data/lib/phrase/models/comment_create_parameters.rb +205 -0
  258. data/lib/phrase/models/comment_mark_read_parameters.rb +195 -0
  259. data/lib/phrase/models/comment_update_parameters.rb +205 -0
  260. data/lib/phrase/models/distribution.rb +252 -0
  261. data/lib/phrase/models/distribution_create_parameters.rb +259 -0
  262. data/lib/phrase/models/distribution_preview.rb +250 -0
  263. data/lib/phrase/models/distribution_update_parameters.rb +259 -0
  264. data/lib/phrase/models/document.rb +221 -0
  265. data/lib/phrase/models/format.rb +275 -0
  266. data/lib/phrase/models/github_sync_export_parameters.rb +195 -0
  267. data/lib/phrase/models/github_sync_import_parameters.rb +195 -0
  268. data/lib/phrase/models/gitlab_sync.rb +284 -0
  269. data/lib/phrase/models/gitlab_sync_export.rb +203 -0
  270. data/lib/phrase/models/gitlab_sync_export_parameters.rb +195 -0
  271. data/lib/phrase/models/gitlab_sync_history.rb +232 -0
  272. data/lib/phrase/models/gitlab_sync_import_parameters.rb +195 -0
  273. data/lib/phrase/models/glossary.rb +232 -0
  274. data/lib/phrase/models/glossary_create_parameters.rb +217 -0
  275. data/lib/phrase/models/glossary_term.rb +259 -0
  276. data/lib/phrase/models/glossary_term_create_parameters.rb +225 -0
  277. data/lib/phrase/models/glossary_term_translation.rb +230 -0
  278. data/lib/phrase/models/glossary_term_translation_create_parameters.rb +205 -0
  279. data/lib/phrase/models/glossary_term_translation_update_parameters.rb +205 -0
  280. data/lib/phrase/models/glossary_term_update_parameters.rb +225 -0
  281. data/lib/phrase/models/glossary_update_parameters.rb +217 -0
  282. data/lib/phrase/models/inline_response422.rb +205 -0
  283. data/lib/phrase/models/inline_response422_errors.rb +212 -0
  284. data/lib/phrase/models/invitation.rb +279 -0
  285. data/lib/phrase/models/invitation_create_parameters.rb +237 -0
  286. data/lib/phrase/models/invitation_update_parameters.rb +227 -0
  287. data/lib/phrase/models/job.rb +248 -0
  288. data/lib/phrase/models/job_complete_parameters.rb +195 -0
  289. data/lib/phrase/models/job_create_parameters.rb +249 -0
  290. data/lib/phrase/models/job_details.rb +296 -0
  291. data/lib/phrase/models/job_details1.rb +225 -0
  292. data/lib/phrase/models/job_keys_create_parameters.rb +207 -0
  293. data/lib/phrase/models/job_locale.rb +223 -0
  294. data/lib/phrase/models/job_locale_complete_parameters.rb +195 -0
  295. data/lib/phrase/models/job_locale_reopen_parameters.rb +195 -0
  296. data/lib/phrase/models/job_locale_update_parameters.rb +217 -0
  297. data/lib/phrase/models/job_locales_create_parameters.rb +217 -0
  298. data/lib/phrase/models/job_preview.rb +212 -0
  299. data/lib/phrase/models/job_reopen_parameters.rb +195 -0
  300. data/lib/phrase/models/job_start_parameters.rb +195 -0
  301. data/lib/phrase/models/job_update_parameters.rb +225 -0
  302. data/lib/phrase/models/key_create_parameters.rb +335 -0
  303. data/lib/phrase/models/key_preview.rb +212 -0
  304. data/lib/phrase/models/key_update_parameters.rb +335 -0
  305. data/lib/phrase/models/keys_search_parameters.rb +235 -0
  306. data/lib/phrase/models/keys_tag_parameters.rb +225 -0
  307. data/lib/phrase/models/keys_untag_parameters.rb +225 -0
  308. data/lib/phrase/models/locale.rb +277 -0
  309. data/lib/phrase/models/locale_create_parameters.rb +285 -0
  310. data/lib/phrase/models/locale_details.rb +294 -0
  311. data/lib/phrase/models/locale_details1.rb +194 -0
  312. data/lib/phrase/models/locale_preview.rb +212 -0
  313. data/lib/phrase/models/locale_statistics.rb +248 -0
  314. data/lib/phrase/models/locale_update_parameters.rb +285 -0
  315. data/lib/phrase/models/member.rb +232 -0
  316. data/lib/phrase/models/member_update_parameters.rb +227 -0
  317. data/lib/phrase/models/order_confirm_parameters.rb +195 -0
  318. data/lib/phrase/models/order_create_parameters.rb +327 -0
  319. data/lib/phrase/models/project.rb +257 -0
  320. data/lib/phrase/models/project_create_parameters.rb +255 -0
  321. data/lib/phrase/models/project_details.rb +274 -0
  322. data/lib/phrase/models/project_details1.rb +203 -0
  323. data/lib/phrase/models/project_locales.rb +249 -0
  324. data/lib/phrase/models/project_locales1.rb +196 -0
  325. data/lib/phrase/models/project_short.rb +230 -0
  326. data/lib/phrase/models/project_update_parameters.rb +245 -0
  327. data/lib/phrase/models/release.rb +290 -0
  328. data/lib/phrase/models/release_create_parameters.rb +217 -0
  329. data/lib/phrase/models/release_preview.rb +290 -0
  330. data/lib/phrase/models/release_update_parameters.rb +217 -0
  331. data/lib/phrase/models/screenshot.rb +248 -0
  332. data/lib/phrase/models/screenshot_create_parameters.rb +215 -0
  333. data/lib/phrase/models/screenshot_marker.rb +239 -0
  334. data/lib/phrase/models/screenshot_marker_create_parameters.rb +205 -0
  335. data/lib/phrase/models/screenshot_marker_update_parameters.rb +205 -0
  336. data/lib/phrase/models/screenshot_update_parameters.rb +215 -0
  337. data/lib/phrase/models/space.rb +241 -0
  338. data/lib/phrase/models/space_create_parameters.rb +195 -0
  339. data/lib/phrase/models/space_update_parameters.rb +195 -0
  340. data/lib/phrase/models/spaces_projects_create_parameters.rb +195 -0
  341. data/lib/phrase/models/styleguide.rb +221 -0
  342. data/lib/phrase/models/styleguide_create_parameters.rb +315 -0
  343. data/lib/phrase/models/styleguide_details.rb +346 -0
  344. data/lib/phrase/models/styleguide_details1.rb +302 -0
  345. data/lib/phrase/models/styleguide_preview.rb +203 -0
  346. data/lib/phrase/models/styleguide_update_parameters.rb +315 -0
  347. data/lib/phrase/models/tag.rb +221 -0
  348. data/lib/phrase/models/tag_create_parameters.rb +205 -0
  349. data/lib/phrase/models/tag_with_stats.rb +240 -0
  350. data/lib/phrase/models/tag_with_stats1.rb +196 -0
  351. data/lib/phrase/models/tag_with_stats1_statistics.rb +221 -0
  352. data/lib/phrase/models/tag_with_stats1_statistics1.rb +203 -0
  353. data/lib/phrase/models/team.rb +254 -0
  354. data/lib/phrase/models/team_create_parameters.rb +195 -0
  355. data/lib/phrase/models/team_detail.rb +254 -0
  356. data/lib/phrase/models/team_update_parameters.rb +195 -0
  357. data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
  358. data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
  359. data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
  360. data/lib/phrase/models/translation.rb +286 -0
  361. data/lib/phrase/models/translation_create_parameters.rb +265 -0
  362. data/lib/phrase/models/translation_details.rb +312 -0
  363. data/lib/phrase/models/translation_details1.rb +203 -0
  364. data/lib/phrase/models/translation_exclude_parameters.rb +195 -0
  365. data/lib/phrase/models/translation_include_parameters.rb +195 -0
  366. data/lib/phrase/models/translation_key.rb +268 -0
  367. data/lib/phrase/models/translation_key_details.rb +357 -0
  368. data/lib/phrase/models/translation_key_details1.rb +266 -0
  369. data/lib/phrase/models/translation_order.rb +340 -0
  370. data/lib/phrase/models/translation_review_parameters.rb +195 -0
  371. data/lib/phrase/models/translation_unverify_parameters.rb +195 -0
  372. data/lib/phrase/models/translation_update_parameters.rb +245 -0
  373. data/lib/phrase/models/translation_verify_parameters.rb +195 -0
  374. data/lib/phrase/models/translation_version.rb +257 -0
  375. data/lib/phrase/models/translation_version_with_user.rb +274 -0
  376. data/lib/phrase/models/translation_version_with_user1.rb +194 -0
  377. data/lib/phrase/models/translations_exclude_parameters.rb +225 -0
  378. data/lib/phrase/models/translations_include_parameters.rb +225 -0
  379. data/lib/phrase/models/translations_review_parameters.rb +205 -0
  380. data/lib/phrase/models/translations_search_parameters.rb +225 -0
  381. data/lib/phrase/models/translations_unverify_parameters.rb +225 -0
  382. data/lib/phrase/models/translations_verify_parameters.rb +225 -0
  383. data/lib/phrase/models/upload.rb +257 -0
  384. data/lib/phrase/models/upload_create_parameters.rb +335 -0
  385. data/lib/phrase/models/upload_summary.rb +257 -0
  386. data/lib/phrase/models/user.rb +248 -0
  387. data/lib/phrase/models/user_preview.rb +212 -0
  388. data/lib/phrase/models/webhook.rb +250 -0
  389. data/lib/phrase/models/webhook_create_parameters.rb +225 -0
  390. data/lib/phrase/models/webhook_update_parameters.rb +225 -0
  391. data/lib/phrase/response.rb +41 -0
  392. data/lib/phrase/version.rb +1 -1
  393. data/phrase.gemspec +27 -27
  394. data/spec/api/accounts_api_spec.rb +50 -0
  395. data/spec/api/authorizations_api_spec.rb +90 -0
  396. data/spec/api/bitbucket_sync_api_spec.rb +64 -0
  397. data/spec/api/blacklisted_keys_api_spec.rb +96 -0
  398. data/spec/api/branches_api_spec.rb +124 -0
  399. data/spec/api/comments_api_spec.rb +151 -0
  400. data/spec/api/distributions_api_spec.rb +95 -0
  401. data/spec/api/documents_api_spec.rb +52 -0
  402. data/spec/api/formats_api_spec.rb +35 -0
  403. data/spec/api/git_hub_sync_api_spec.rb +49 -0
  404. data/spec/api/git_lab_sync_api_spec.rb +125 -0
  405. data/spec/api/glossaries_api_spec.rb +95 -0
  406. data/spec/api/glossary_term_translations_api_spec.rb +72 -0
  407. data/spec/api/glossary_terms_api_spec.rb +100 -0
  408. data/spec/api/invitations_api_spec.rb +109 -0
  409. data/spec/api/job_locales_api_spec.rb +135 -0
  410. data/spec/api/jobs_api_spec.rb +177 -0
  411. data/spec/api/keys_api_spec.rb +162 -0
  412. data/spec/api/locales_api_spec.rb +126 -0
  413. data/spec/api/members_api_spec.rb +81 -0
  414. data/spec/api/orders_api_spec.rb +98 -0
  415. data/spec/api/projects_api_spec.rb +90 -0
  416. data/spec/api/releases_api_spec.rb +115 -0
  417. data/spec/api/screenshot_markers_api_spec.rb +98 -0
  418. data/spec/api/screenshots_api_spec.rb +95 -0
  419. data/spec/api/spaces_api_spec.rb +141 -0
  420. data/spec/api/style_guides_api_spec.rb +95 -0
  421. data/spec/api/tags_api_spec.rb +83 -0
  422. data/spec/api/teams_api_spec.rb +185 -0
  423. data/spec/api/translations_api_spec.rb +287 -0
  424. data/spec/api/uploads_api_spec.rb +82 -0
  425. data/spec/api/users_api_spec.rb +35 -0
  426. data/spec/api/versions_history_api_spec.rb +56 -0
  427. data/spec/api/webhooks_api_spec.rb +109 -0
  428. data/spec/api_client_spec.rb +214 -0
  429. data/spec/configuration_spec.rb +30 -0
  430. data/spec/models/account_details1_spec.rb +29 -0
  431. data/spec/models/account_details_spec.rb +59 -0
  432. data/spec/models/account_spec.rb +59 -0
  433. data/spec/models/affected_count_spec.rb +29 -0
  434. data/spec/models/affected_resources_spec.rb +29 -0
  435. data/spec/models/authorization_create_parameters_spec.rb +41 -0
  436. data/spec/models/authorization_spec.rb +71 -0
  437. data/spec/models/authorization_update_parameters_spec.rb +41 -0
  438. data/spec/models/authorization_with_token1_spec.rb +29 -0
  439. data/spec/models/authorization_with_token_spec.rb +77 -0
  440. data/spec/models/bitbucket_sync_export_parameters_spec.rb +29 -0
  441. data/spec/models/bitbucket_sync_export_response_spec.rb +29 -0
  442. data/spec/models/bitbucket_sync_import_parameters_spec.rb +29 -0
  443. data/spec/models/bitbucket_sync_spec.rb +59 -0
  444. data/spec/models/blacklisted_key_create_parameters_spec.rb +29 -0
  445. data/spec/models/blacklisted_key_spec.rb +47 -0
  446. data/spec/models/blacklisted_key_update_parameters_spec.rb +29 -0
  447. data/spec/models/branch_create_parameters_spec.rb +29 -0
  448. data/spec/models/branch_merge_parameters_spec.rb +29 -0
  449. data/spec/models/branch_spec.rb +65 -0
  450. data/spec/models/branch_update_parameters_spec.rb +29 -0
  451. data/spec/models/comment_create_parameters_spec.rb +35 -0
  452. data/spec/models/comment_mark_read_parameters_spec.rb +29 -0
  453. data/spec/models/comment_spec.rb +53 -0
  454. data/spec/models/comment_update_parameters_spec.rb +35 -0
  455. data/spec/models/distribution_create_parameters_spec.rb +65 -0
  456. data/spec/models/distribution_preview_spec.rb +65 -0
  457. data/spec/models/distribution_spec.rb +65 -0
  458. data/spec/models/distribution_update_parameters_spec.rb +65 -0
  459. data/spec/models/document_spec.rb +47 -0
  460. data/spec/models/format_spec.rb +83 -0
  461. data/spec/models/github_sync_export_parameters_spec.rb +29 -0
  462. data/spec/models/github_sync_import_parameters_spec.rb +29 -0
  463. data/spec/models/gitlab_sync_export_parameters_spec.rb +29 -0
  464. data/spec/models/gitlab_sync_export_spec.rb +35 -0
  465. data/spec/models/gitlab_sync_history_spec.rb +53 -0
  466. data/spec/models/gitlab_sync_import_parameters_spec.rb +29 -0
  467. data/spec/models/gitlab_sync_spec.rb +89 -0
  468. data/spec/models/glossary_create_parameters_spec.rb +41 -0
  469. data/spec/models/glossary_spec.rb +53 -0
  470. data/spec/models/glossary_term_create_parameters_spec.rb +47 -0
  471. data/spec/models/glossary_term_spec.rb +71 -0
  472. data/spec/models/glossary_term_translation_create_parameters_spec.rb +35 -0
  473. data/spec/models/glossary_term_translation_spec.rb +53 -0
  474. data/spec/models/glossary_term_translation_update_parameters_spec.rb +35 -0
  475. data/spec/models/glossary_term_update_parameters_spec.rb +47 -0
  476. data/spec/models/glossary_update_parameters_spec.rb +41 -0
  477. data/spec/models/inline_response422_errors_spec.rb +41 -0
  478. data/spec/models/inline_response422_spec.rb +35 -0
  479. data/spec/models/invitation_create_parameters_spec.rb +53 -0
  480. data/spec/models/invitation_spec.rb +83 -0
  481. data/spec/models/invitation_update_parameters_spec.rb +47 -0
  482. data/spec/models/job_complete_parameters_spec.rb +29 -0
  483. data/spec/models/job_create_parameters_spec.rb +59 -0
  484. data/spec/models/job_details1_spec.rb +47 -0
  485. data/spec/models/job_details_spec.rb +89 -0
  486. data/spec/models/job_keys_create_parameters_spec.rb +35 -0
  487. data/spec/models/job_locale_complete_parameters_spec.rb +29 -0
  488. data/spec/models/job_locale_reopen_parameters_spec.rb +29 -0
  489. data/spec/models/job_locale_spec.rb +47 -0
  490. data/spec/models/job_locale_update_parameters_spec.rb +41 -0
  491. data/spec/models/job_locales_create_parameters_spec.rb +41 -0
  492. data/spec/models/job_preview_spec.rb +41 -0
  493. data/spec/models/job_reopen_parameters_spec.rb +29 -0
  494. data/spec/models/job_spec.rb +65 -0
  495. data/spec/models/job_start_parameters_spec.rb +29 -0
  496. data/spec/models/job_update_parameters_spec.rb +47 -0
  497. data/spec/models/key_create_parameters_spec.rb +113 -0
  498. data/spec/models/key_preview_spec.rb +41 -0
  499. data/spec/models/key_update_parameters_spec.rb +113 -0
  500. data/spec/models/keys_search_parameters_spec.rb +53 -0
  501. data/spec/models/keys_tag_parameters_spec.rb +47 -0
  502. data/spec/models/keys_untag_parameters_spec.rb +47 -0
  503. data/spec/models/locale_create_parameters_spec.rb +83 -0
  504. data/spec/models/locale_details1_spec.rb +29 -0
  505. data/spec/models/locale_details_spec.rb +89 -0
  506. data/spec/models/locale_preview_spec.rb +41 -0
  507. data/spec/models/locale_spec.rb +83 -0
  508. data/spec/models/locale_statistics_spec.rb +65 -0
  509. data/spec/models/locale_update_parameters_spec.rb +83 -0
  510. data/spec/models/member_spec.rb +53 -0
  511. data/spec/models/member_update_parameters_spec.rb +47 -0
  512. data/spec/models/order_confirm_parameters_spec.rb +29 -0
  513. data/spec/models/order_create_parameters_spec.rb +107 -0
  514. data/spec/models/project_create_parameters_spec.rb +65 -0
  515. data/spec/models/project_details1_spec.rb +35 -0
  516. data/spec/models/project_details_spec.rb +77 -0
  517. data/spec/models/project_locales1_spec.rb +29 -0
  518. data/spec/models/project_locales_spec.rb +59 -0
  519. data/spec/models/project_short_spec.rb +53 -0
  520. data/spec/models/project_spec.rb +71 -0
  521. data/spec/models/project_update_parameters_spec.rb +59 -0
  522. data/spec/models/release_create_parameters_spec.rb +41 -0
  523. data/spec/models/release_preview_spec.rb +89 -0
  524. data/spec/models/release_spec.rb +89 -0
  525. data/spec/models/release_update_parameters_spec.rb +41 -0
  526. data/spec/models/screenshot_create_parameters_spec.rb +41 -0
  527. data/spec/models/screenshot_marker_create_parameters_spec.rb +35 -0
  528. data/spec/models/screenshot_marker_spec.rb +59 -0
  529. data/spec/models/screenshot_marker_update_parameters_spec.rb +35 -0
  530. data/spec/models/screenshot_spec.rb +65 -0
  531. data/spec/models/screenshot_update_parameters_spec.rb +41 -0
  532. data/spec/models/space_create_parameters_spec.rb +29 -0
  533. data/spec/models/space_spec.rb +59 -0
  534. data/spec/models/space_update_parameters_spec.rb +29 -0
  535. data/spec/models/spaces_projects_create_parameters_spec.rb +29 -0
  536. data/spec/models/styleguide_create_parameters_spec.rb +101 -0
  537. data/spec/models/styleguide_details1_spec.rb +101 -0
  538. data/spec/models/styleguide_details_spec.rb +125 -0
  539. data/spec/models/styleguide_preview_spec.rb +35 -0
  540. data/spec/models/styleguide_spec.rb +47 -0
  541. data/spec/models/styleguide_update_parameters_spec.rb +101 -0
  542. data/spec/models/tag_create_parameters_spec.rb +35 -0
  543. data/spec/models/tag_spec.rb +47 -0
  544. data/spec/models/tag_with_stats1_spec.rb +29 -0
  545. data/spec/models/tag_with_stats1_statistics1_spec.rb +35 -0
  546. data/spec/models/tag_with_stats1_statistics_spec.rb +47 -0
  547. data/spec/models/tag_with_stats_spec.rb +53 -0
  548. data/spec/models/team_create_parameters_spec.rb +29 -0
  549. data/spec/models/team_detail_spec.rb +65 -0
  550. data/spec/models/team_spec.rb +65 -0
  551. data/spec/models/team_update_parameters_spec.rb +29 -0
  552. data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
  553. data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
  554. data/spec/models/teams_users_create_parameters_spec.rb +29 -0
  555. data/spec/models/translation_create_parameters_spec.rb +71 -0
  556. data/spec/models/translation_details1_spec.rb +35 -0
  557. data/spec/models/translation_details_spec.rb +101 -0
  558. data/spec/models/translation_exclude_parameters_spec.rb +29 -0
  559. data/spec/models/translation_include_parameters_spec.rb +29 -0
  560. data/spec/models/translation_key_details1_spec.rb +77 -0
  561. data/spec/models/translation_key_details_spec.rb +131 -0
  562. data/spec/models/translation_key_spec.rb +77 -0
  563. data/spec/models/translation_order_spec.rb +125 -0
  564. data/spec/models/translation_review_parameters_spec.rb +29 -0
  565. data/spec/models/translation_spec.rb +89 -0
  566. data/spec/models/translation_unverify_parameters_spec.rb +29 -0
  567. data/spec/models/translation_update_parameters_spec.rb +59 -0
  568. data/spec/models/translation_verify_parameters_spec.rb +29 -0
  569. data/spec/models/translation_version_spec.rb +71 -0
  570. data/spec/models/translation_version_with_user1_spec.rb +29 -0
  571. data/spec/models/translation_version_with_user_spec.rb +77 -0
  572. data/spec/models/translations_exclude_parameters_spec.rb +47 -0
  573. data/spec/models/translations_include_parameters_spec.rb +47 -0
  574. data/spec/models/translations_review_parameters_spec.rb +35 -0
  575. data/spec/models/translations_search_parameters_spec.rb +47 -0
  576. data/spec/models/translations_unverify_parameters_spec.rb +47 -0
  577. data/spec/models/translations_verify_parameters_spec.rb +47 -0
  578. data/spec/models/upload_create_parameters_spec.rb +113 -0
  579. data/spec/models/upload_spec.rb +71 -0
  580. data/spec/models/upload_summary_spec.rb +71 -0
  581. data/spec/models/user_preview_spec.rb +41 -0
  582. data/spec/models/user_spec.rb +65 -0
  583. data/spec/models/webhook_create_parameters_spec.rb +47 -0
  584. data/spec/models/webhook_spec.rb +65 -0
  585. data/spec/models/webhook_update_parameters_spec.rb +47 -0
  586. data/spec/spec_helper.rb +99 -0
  587. metadata +819 -188
  588. data/.gitignore +0 -25
  589. data/.travis.yml +0 -4
  590. data/Guardfile +0 -29
  591. data/bin/phrase +0 -8
  592. data/cacert.pem +0 -3366
  593. data/lib/ext/all.rb +0 -5
  594. data/lib/ext/hash.rb +0 -8
  595. data/lib/ext/object.rb +0 -130
  596. data/lib/ext/try.rb +0 -57
  597. data/lib/generators/phrase/install_generator.rb +0 -37
  598. data/lib/generators/templates/README +0 -11
  599. data/lib/generators/templates/phrase.rb +0 -21
  600. data/lib/phrase/adapters/fast_gettext.rb +0 -25
  601. data/lib/phrase/adapters/i18n.rb +0 -12
  602. data/lib/phrase/api.rb +0 -7
  603. data/lib/phrase/api/client.rb +0 -308
  604. data/lib/phrase/api/client/http.rb +0 -56
  605. data/lib/phrase/api/config.rb +0 -34
  606. data/lib/phrase/api/exceptions.rb +0 -9
  607. data/lib/phrase/api/query_params.rb +0 -22
  608. data/lib/phrase/backend.rb +0 -7
  609. data/lib/phrase/backend/base.rb +0 -6
  610. data/lib/phrase/backend/phrase_service.rb +0 -163
  611. data/lib/phrase/cache.rb +0 -34
  612. data/lib/phrase/config.rb +0 -94
  613. data/lib/phrase/delegate.rb +0 -36
  614. data/lib/phrase/delegate/fast_gettext.rb +0 -27
  615. data/lib/phrase/delegate/i18n.rb +0 -166
  616. data/lib/phrase/engine.rb +0 -14
  617. data/lib/phrase/formats.rb +0 -172
  618. data/lib/phrase/formats/angular_translate.rb +0 -19
  619. data/lib/phrase/formats/csv.rb +0 -19
  620. data/lib/phrase/formats/custom.rb +0 -40
  621. data/lib/phrase/formats/gettext.rb +0 -27
  622. data/lib/phrase/formats/gettext_template.rb +0 -19
  623. data/lib/phrase/formats/ini.rb +0 -19
  624. data/lib/phrase/formats/json.rb +0 -19
  625. data/lib/phrase/formats/laravel.rb +0 -19
  626. data/lib/phrase/formats/mozilla_properties.rb +0 -8
  627. data/lib/phrase/formats/nested_json.rb +0 -19
  628. data/lib/phrase/formats/node_json.rb +0 -23
  629. data/lib/phrase/formats/php_array.rb +0 -19
  630. data/lib/phrase/formats/play_properties.rb +0 -15
  631. data/lib/phrase/formats/plist.rb +0 -19
  632. data/lib/phrase/formats/properties.rb +0 -19
  633. data/lib/phrase/formats/properties_xml.rb +0 -19
  634. data/lib/phrase/formats/qt_phrase_book.rb +0 -19
  635. data/lib/phrase/formats/qt_translation_source.rb +0 -19
  636. data/lib/phrase/formats/resx.rb +0 -19
  637. data/lib/phrase/formats/resx_windowsphone.rb +0 -19
  638. data/lib/phrase/formats/simple_json.rb +0 -19
  639. data/lib/phrase/formats/strings.rb +0 -45
  640. data/lib/phrase/formats/tmx.rb +0 -19
  641. data/lib/phrase/formats/windows8_resource.rb +0 -19
  642. data/lib/phrase/formats/xliff.rb +0 -19
  643. data/lib/phrase/formats/xml.rb +0 -49
  644. data/lib/phrase/formats/yaml.rb +0 -19
  645. data/lib/phrase/formats/yaml_symfony.rb +0 -19
  646. data/lib/phrase/formats/yaml_symfony2.rb +0 -8
  647. data/lib/phrase/hash_flattener.rb +0 -21
  648. data/lib/phrase/tool.rb +0 -46
  649. data/lib/phrase/tool/commands.rb +0 -56
  650. data/lib/phrase/tool/commands/base.rb +0 -73
  651. data/lib/phrase/tool/commands/init.rb +0 -51
  652. data/lib/phrase/tool/commands/pull.rb +0 -109
  653. data/lib/phrase/tool/commands/push.rb +0 -163
  654. data/lib/phrase/tool/commands/show_help.rb +0 -26
  655. data/lib/phrase/tool/commands/show_version.rb +0 -17
  656. data/lib/phrase/tool/commands/tags.rb +0 -29
  657. data/lib/phrase/tool/config.rb +0 -120
  658. data/lib/phrase/tool/encoding_detector.rb +0 -17
  659. data/lib/phrase/tool/locale.rb +0 -41
  660. data/lib/phrase/tool/options.rb +0 -32
  661. data/lib/phrase/tool/options_factory.rb +0 -150
  662. data/lib/phrase/tool/tag_validator.rb +0 -9
  663. data/lib/phrase/view_helpers.rb +0 -19
@@ -0,0 +1,207 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class JobKeysCreateParameters
5
+ # specify the branch to use
6
+ attr_accessor :branch
7
+
8
+ # ids of keys that should added to the job
9
+ attr_accessor :translation_key_ids
10
+
11
+ # Attribute mapping from ruby-style variable name to JSON key.
12
+ def self.attribute_map
13
+ {
14
+ :'branch' => :'branch',
15
+ :'translation_key_ids' => :'translation_key_ids'
16
+ }
17
+ end
18
+
19
+ # Attribute type mapping.
20
+ def self.openapi_types
21
+ {
22
+ :'branch' => :'String',
23
+ :'translation_key_ids' => :'Array<String>'
24
+ }
25
+ end
26
+
27
+ # List of attributes with nullable: true
28
+ def self.openapi_nullable
29
+ Set.new([
30
+ ])
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobKeysCreateParameters` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobKeysCreateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'branch')
49
+ self.branch = attributes[:'branch']
50
+ end
51
+
52
+ if attributes.key?(:'translation_key_ids')
53
+ if (value = attributes[:'translation_key_ids']).is_a?(Array)
54
+ self.translation_key_ids = value
55
+ end
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ branch == o.branch &&
78
+ translation_key_ids == o.translation_key_ids
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Integer] Hash code
89
+ def hash
90
+ [branch, translation_key_ids].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def self.build_from_hash(attributes)
97
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.openapi_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ Phrase.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end
206
+ end
207
+ end
@@ -0,0 +1,223 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class JobLocale
5
+ attr_accessor :id
6
+
7
+ attr_accessor :job
8
+
9
+ attr_accessor :locale
10
+
11
+ attr_accessor :users
12
+
13
+ # Attribute mapping from ruby-style variable name to JSON key.
14
+ def self.attribute_map
15
+ {
16
+ :'id' => :'id',
17
+ :'job' => :'job',
18
+ :'locale' => :'locale',
19
+ :'users' => :'users'
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.openapi_types
25
+ {
26
+ :'id' => :'String',
27
+ :'job' => :'JobPreview',
28
+ :'locale' => :'LocalePreview',
29
+ :'users' => :'Array<UserPreview>'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobLocale` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobLocale`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'id')
55
+ self.id = attributes[:'id']
56
+ end
57
+
58
+ if attributes.key?(:'job')
59
+ self.job = attributes[:'job']
60
+ end
61
+
62
+ if attributes.key?(:'locale')
63
+ self.locale = attributes[:'locale']
64
+ end
65
+
66
+ if attributes.key?(:'users')
67
+ if (value = attributes[:'users']).is_a?(Array)
68
+ self.users = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id &&
92
+ job == o.job &&
93
+ locale == o.locale &&
94
+ users == o.users
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [id, job, locale, users].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ Phrase.const_get(type).build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+ end
223
+ end
@@ -0,0 +1,195 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class JobLocaleCompleteParameters
5
+ # specify the branch to use
6
+ attr_accessor :branch
7
+
8
+ # Attribute mapping from ruby-style variable name to JSON key.
9
+ def self.attribute_map
10
+ {
11
+ :'branch' => :'branch'
12
+ }
13
+ end
14
+
15
+ # Attribute type mapping.
16
+ def self.openapi_types
17
+ {
18
+ :'branch' => :'String'
19
+ }
20
+ end
21
+
22
+ # List of attributes with nullable: true
23
+ def self.openapi_nullable
24
+ Set.new([
25
+ ])
26
+ end
27
+
28
+ # Initializes the object
29
+ # @param [Hash] attributes Model attributes in the form of hash
30
+ def initialize(attributes = {})
31
+ if (!attributes.is_a?(Hash))
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobLocaleCompleteParameters` initialize method"
33
+ end
34
+
35
+ # check to see if the attribute exists and convert string to symbol for hash key
36
+ attributes = attributes.each_with_object({}) { |(k, v), h|
37
+ if (!self.class.attribute_map.key?(k.to_sym))
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobLocaleCompleteParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
39
+ end
40
+ h[k.to_sym] = v
41
+ }
42
+
43
+ if attributes.key?(:'branch')
44
+ self.branch = attributes[:'branch']
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ branch == o.branch
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Integer] Hash code
77
+ def hash
78
+ [branch].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def self.build_from_hash(attributes)
85
+ new.build_from_hash(attributes)
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.openapi_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :Boolean
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ Phrase.const_get(type).build_from_hash(value)
146
+ end
147
+ end
148
+
149
+ # Returns the string representation of the object
150
+ # @return [String] String presentation of the object
151
+ def to_s
152
+ to_hash.to_s
153
+ end
154
+
155
+ # to_body is an alias to to_hash (backward compatibility)
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_body
158
+ to_hash
159
+ end
160
+
161
+ # Returns the object in the form of hash
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_hash
164
+ hash = {}
165
+ self.class.attribute_map.each_pair do |attr, param|
166
+ value = self.send(attr)
167
+ if value.nil?
168
+ is_nullable = self.class.openapi_nullable.include?(attr)
169
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
170
+ end
171
+
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+ end
195
+ end