weblate 0.1.0

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 (311) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/COPYING +674 -0
  4. data/Gemfile +8 -0
  5. data/README.md +334 -0
  6. data/Rakefile +49 -0
  7. data/bin/console +11 -0
  8. data/bin/setup +8 -0
  9. data/bin/smoketest +14 -0
  10. data/bin/smoketest~ +0 -0
  11. data/docs/ActionEnum.md +15 -0
  12. data/docs/Addon.md +28 -0
  13. data/docs/AddonsApi.md +366 -0
  14. data/docs/AutoComponentList.md +20 -0
  15. data/docs/BasicUser.md +22 -0
  16. data/docs/BlankEnum.md +15 -0
  17. data/docs/CategoriesApi.md +520 -0
  18. data/docs/Category.md +30 -0
  19. data/docs/Change.md +42 -0
  20. data/docs/ChangesApi.md +163 -0
  21. data/docs/ColorEnum.md +15 -0
  22. data/docs/Component.md +146 -0
  23. data/docs/ComponentLanguageCodeStyle.md +49 -0
  24. data/docs/ComponentList.md +30 -0
  25. data/docs/ComponentListsApi.md +667 -0
  26. data/docs/ComponentsApi.md +1653 -0
  27. data/docs/ConflictsEnum.md +15 -0
  28. data/docs/DirectionEnum.md +15 -0
  29. data/docs/FileFormatEnum.md +15 -0
  30. data/docs/FrequencyEnum.md +15 -0
  31. data/docs/FuzzyEnum.md +15 -0
  32. data/docs/Group.md +40 -0
  33. data/docs/GroupsApi.md +1257 -0
  34. data/docs/Language.md +36 -0
  35. data/docs/LanguageCodeStyleEnum.md +15 -0
  36. data/docs/LanguagePlural.md +26 -0
  37. data/docs/LanguageSelectionEnum.md +15 -0
  38. data/docs/LanguagesApi.md +520 -0
  39. data/docs/LicenseEnum.md +15 -0
  40. data/docs/LockRequest.md +18 -0
  41. data/docs/Memory.md +34 -0
  42. data/docs/MemoryApi.md +448 -0
  43. data/docs/MergeStyleEnum.md +15 -0
  44. data/docs/MethodEnum.md +15 -0
  45. data/docs/Metrics.md +42 -0
  46. data/docs/MetricsApi.md +81 -0
  47. data/docs/NewLangEnum.md +15 -0
  48. data/docs/Notification.md +28 -0
  49. data/docs/NotificationEnum.md +15 -0
  50. data/docs/OperationEnum.md +15 -0
  51. data/docs/PaginatedAddonList.md +24 -0
  52. data/docs/PaginatedBasicUserList.md +24 -0
  53. data/docs/PaginatedCategoryList.md +24 -0
  54. data/docs/PaginatedChangeList.md +24 -0
  55. data/docs/PaginatedComponentList.md +24 -0
  56. data/docs/PaginatedComponentListList.md +24 -0
  57. data/docs/PaginatedGroupList.md +24 -0
  58. data/docs/PaginatedLanguageList.md +24 -0
  59. data/docs/PaginatedMemoryList.md +24 -0
  60. data/docs/PaginatedNotificationList.md +24 -0
  61. data/docs/PaginatedProjectList.md +24 -0
  62. data/docs/PaginatedRoleList.md +24 -0
  63. data/docs/PaginatedScreenshotList.md +24 -0
  64. data/docs/PaginatedTranslationList.md +24 -0
  65. data/docs/PaginatedUnitList.md +24 -0
  66. data/docs/PatchedAddon.md +28 -0
  67. data/docs/PatchedBasicUser.md +22 -0
  68. data/docs/PatchedCategory.md +30 -0
  69. data/docs/PatchedComponent.md +146 -0
  70. data/docs/PatchedComponentList.md +30 -0
  71. data/docs/PatchedGroup.md +40 -0
  72. data/docs/PatchedLanguage.md +36 -0
  73. data/docs/PatchedMemory.md +34 -0
  74. data/docs/PatchedNotification.md +28 -0
  75. data/docs/PatchedProject.md +58 -0
  76. data/docs/PatchedRole.md +24 -0
  77. data/docs/PatchedScreenshot.md +30 -0
  78. data/docs/PatchedUnitWrite.md +26 -0
  79. data/docs/PriorityEnum.md +15 -0
  80. data/docs/Project.md +58 -0
  81. data/docs/ProjectSelectionEnum.md +15 -0
  82. data/docs/ProjectsApi.md +1392 -0
  83. data/docs/RepoRequest.md +18 -0
  84. data/docs/Role.md +24 -0
  85. data/docs/RolesApi.md +448 -0
  86. data/docs/ScopeEnum.md +15 -0
  87. data/docs/Screenshot.md +30 -0
  88. data/docs/ScreenshotFile.md +18 -0
  89. data/docs/ScreenshotsApi.md +815 -0
  90. data/docs/SearchApi.md +75 -0
  91. data/docs/SourceEnum.md +15 -0
  92. data/docs/StateEnum.md +15 -0
  93. data/docs/TasksApi.md +145 -0
  94. data/docs/TextDirection.md +49 -0
  95. data/docs/Translation.md +80 -0
  96. data/docs/TranslationsApi.md +1028 -0
  97. data/docs/Unit.md +76 -0
  98. data/docs/UnitFlatLabels.md +24 -0
  99. data/docs/UnitLabels.md +24 -0
  100. data/docs/UnitWrite.md +26 -0
  101. data/docs/UnitsApi.md +376 -0
  102. data/docs/UploadRequest.md +28 -0
  103. data/docs/UploadRequestConflicts.md +49 -0
  104. data/docs/UploadRequestFuzzy.md +49 -0
  105. data/docs/UsersApi.md +1130 -0
  106. data/docs/VcsEnum.md +15 -0
  107. data/git_push.sh +57 -0
  108. data/lib/weblate/api/addons_api.rb +353 -0
  109. data/lib/weblate/api/categories_api.rb +495 -0
  110. data/lib/weblate/api/changes_api.rb +165 -0
  111. data/lib/weblate/api/component_lists_api.rb +642 -0
  112. data/lib/weblate/api/components_api.rb +1775 -0
  113. data/lib/weblate/api/groups_api.rb +1261 -0
  114. data/lib/weblate/api/languages_api.rb +495 -0
  115. data/lib/weblate/api/memory_api.rb +429 -0
  116. data/lib/weblate/api/metrics_api.rb +84 -0
  117. data/lib/weblate/api/projects_api.rb +1331 -0
  118. data/lib/weblate/api/roles_api.rb +429 -0
  119. data/lib/weblate/api/screenshots_api.rb +803 -0
  120. data/lib/weblate/api/search_api.rb +75 -0
  121. data/lib/weblate/api/tasks_api.rb +146 -0
  122. data/lib/weblate/api/translations_api.rb +1232 -0
  123. data/lib/weblate/api/units_api.rb +363 -0
  124. data/lib/weblate/api/users_api.rb +1104 -0
  125. data/lib/weblate/api_client.rb +437 -0
  126. data/lib/weblate/api_error.rb +58 -0
  127. data/lib/weblate/configuration.rb +392 -0
  128. data/lib/weblate/models/action_enum.rb +108 -0
  129. data/lib/weblate/models/addon.rb +314 -0
  130. data/lib/weblate/models/auto_component_list.rb +263 -0
  131. data/lib/weblate/models/basic_user.rb +292 -0
  132. data/lib/weblate/models/blank_enum.rb +39 -0
  133. data/lib/weblate/models/category.rb +361 -0
  134. data/lib/weblate/models/change.rb +408 -0
  135. data/lib/weblate/models/color_enum.rb +54 -0
  136. data/lib/weblate/models/component.rb +1377 -0
  137. data/lib/weblate/models/component_language_code_style.rb +106 -0
  138. data/lib/weblate/models/component_list.rb +366 -0
  139. data/lib/weblate/models/conflicts_enum.rb +41 -0
  140. data/lib/weblate/models/direction_enum.rb +40 -0
  141. data/lib/weblate/models/file_format_enum.rb +101 -0
  142. data/lib/weblate/models/frequency_enum.rb +43 -0
  143. data/lib/weblate/models/fuzzy_enum.rb +40 -0
  144. data/lib/weblate/models/group.rb +421 -0
  145. data/lib/weblate/models/language.rb +417 -0
  146. data/lib/weblate/models/language_code_style_enum.rb +51 -0
  147. data/lib/weblate/models/language_plural.rb +314 -0
  148. data/lib/weblate/models/language_selection_enum.rb +40 -0
  149. data/lib/weblate/models/license_enum.rb +677 -0
  150. data/lib/weblate/models/lock_request.rb +221 -0
  151. data/lib/weblate/models/memory.rb +329 -0
  152. data/lib/weblate/models/merge_style_enum.rb +41 -0
  153. data/lib/weblate/models/method_enum.rb +45 -0
  154. data/lib/weblate/models/metrics.rb +415 -0
  155. data/lib/weblate/models/new_lang_enum.rb +42 -0
  156. data/lib/weblate/models/notification.rb +323 -0
  157. data/lib/weblate/models/notification_enum.rb +60 -0
  158. data/lib/weblate/models/operation_enum.rb +43 -0
  159. data/lib/weblate/models/paginated_addon_list.rb +259 -0
  160. data/lib/weblate/models/paginated_basic_user_list.rb +259 -0
  161. data/lib/weblate/models/paginated_category_list.rb +259 -0
  162. data/lib/weblate/models/paginated_change_list.rb +259 -0
  163. data/lib/weblate/models/paginated_component_list.rb +259 -0
  164. data/lib/weblate/models/paginated_component_list_list.rb +259 -0
  165. data/lib/weblate/models/paginated_group_list.rb +259 -0
  166. data/lib/weblate/models/paginated_language_list.rb +259 -0
  167. data/lib/weblate/models/paginated_memory_list.rb +259 -0
  168. data/lib/weblate/models/paginated_notification_list.rb +259 -0
  169. data/lib/weblate/models/paginated_project_list.rb +259 -0
  170. data/lib/weblate/models/paginated_role_list.rb +259 -0
  171. data/lib/weblate/models/paginated_screenshot_list.rb +259 -0
  172. data/lib/weblate/models/paginated_translation_list.rb +259 -0
  173. data/lib/weblate/models/paginated_unit_list.rb +259 -0
  174. data/lib/weblate/models/patched_addon.rb +279 -0
  175. data/lib/weblate/models/patched_basic_user.rb +271 -0
  176. data/lib/weblate/models/patched_category.rb +319 -0
  177. data/lib/weblate/models/patched_component.rb +1242 -0
  178. data/lib/weblate/models/patched_component_list.rb +324 -0
  179. data/lib/weblate/models/patched_group.rb +365 -0
  180. data/lib/weblate/models/patched_language.rb +375 -0
  181. data/lib/weblate/models/patched_memory.rb +287 -0
  182. data/lib/weblate/models/patched_notification.rb +281 -0
  183. data/lib/weblate/models/patched_project.rb +472 -0
  184. data/lib/weblate/models/patched_role.rb +262 -0
  185. data/lib/weblate/models/patched_screenshot.rb +309 -0
  186. data/lib/weblate/models/patched_unit_write.rb +279 -0
  187. data/lib/weblate/models/priority_enum.rb +43 -0
  188. data/lib/weblate/models/project.rb +563 -0
  189. data/lib/weblate/models/project_selection_enum.rb +43 -0
  190. data/lib/weblate/models/repo_request.rb +243 -0
  191. data/lib/weblate/models/role.rb +290 -0
  192. data/lib/weblate/models/scope_enum.rb +43 -0
  193. data/lib/weblate/models/screenshot.rb +351 -0
  194. data/lib/weblate/models/screenshot_file.rb +221 -0
  195. data/lib/weblate/models/source_enum.rb +45 -0
  196. data/lib/weblate/models/state_enum.rb +43 -0
  197. data/lib/weblate/models/text_direction.rb +105 -0
  198. data/lib/weblate/models/translation.rb +760 -0
  199. data/lib/weblate/models/unit.rb +757 -0
  200. data/lib/weblate/models/unit_flat_labels.rb +315 -0
  201. data/lib/weblate/models/unit_labels.rb +315 -0
  202. data/lib/weblate/models/unit_write.rb +293 -0
  203. data/lib/weblate/models/upload_request.rb +307 -0
  204. data/lib/weblate/models/upload_request_conflicts.rb +105 -0
  205. data/lib/weblate/models/upload_request_fuzzy.rb +105 -0
  206. data/lib/weblate/models/vcs_enum.rb +46 -0
  207. data/lib/weblate/version.rb +15 -0
  208. data/lib/weblate.rb +135 -0
  209. data/manifest.scm +6 -0
  210. data/schema.patched.yaml +10113 -0
  211. data/schema.yaml +10116 -0
  212. data/sig/weblate.rbs +4 -0
  213. data/spec/api/addons_api_spec.rb +88 -0
  214. data/spec/api/categories_api_spec.rb +115 -0
  215. data/spec/api/changes_api_spec.rb +62 -0
  216. data/spec/api/component_lists_api_spec.rb +139 -0
  217. data/spec/api/components_api_spec.rb +307 -0
  218. data/spec/api/groups_api_spec.rb +236 -0
  219. data/spec/api/languages_api_spec.rb +115 -0
  220. data/spec/api/memory_api_spec.rb +104 -0
  221. data/spec/api/metrics_api_spec.rb +46 -0
  222. data/spec/api/projects_api_spec.rb +251 -0
  223. data/spec/api/roles_api_spec.rb +104 -0
  224. data/spec/api/screenshots_api_spec.rb +163 -0
  225. data/spec/api/search_api_spec.rb +45 -0
  226. data/spec/api/tasks_api_spec.rb +55 -0
  227. data/spec/api/translations_api_spec.rb +218 -0
  228. data/spec/api/units_api_spec.rb +93 -0
  229. data/spec/api/users_api_spec.rb +218 -0
  230. data/spec/models/action_enum_spec.rb +30 -0
  231. data/spec/models/addon_spec.rb +66 -0
  232. data/spec/models/auto_component_list_spec.rb +42 -0
  233. data/spec/models/basic_user_spec.rb +48 -0
  234. data/spec/models/blank_enum_spec.rb +30 -0
  235. data/spec/models/category_spec.rb +72 -0
  236. data/spec/models/change_spec.rb +108 -0
  237. data/spec/models/color_enum_spec.rb +30 -0
  238. data/spec/models/component_language_code_style_spec.rb +32 -0
  239. data/spec/models/component_list_spec.rb +72 -0
  240. data/spec/models/component_spec.rb +420 -0
  241. data/spec/models/conflicts_enum_spec.rb +30 -0
  242. data/spec/models/direction_enum_spec.rb +30 -0
  243. data/spec/models/file_format_enum_spec.rb +30 -0
  244. data/spec/models/frequency_enum_spec.rb +30 -0
  245. data/spec/models/fuzzy_enum_spec.rb +30 -0
  246. data/spec/models/group_spec.rb +102 -0
  247. data/spec/models/language_code_style_enum_spec.rb +30 -0
  248. data/spec/models/language_plural_spec.rb +60 -0
  249. data/spec/models/language_selection_enum_spec.rb +30 -0
  250. data/spec/models/language_spec.rb +90 -0
  251. data/spec/models/license_enum_spec.rb +30 -0
  252. data/spec/models/lock_request_spec.rb +36 -0
  253. data/spec/models/memory_spec.rb +84 -0
  254. data/spec/models/merge_style_enum_spec.rb +30 -0
  255. data/spec/models/method_enum_spec.rb +30 -0
  256. data/spec/models/metrics_spec.rb +108 -0
  257. data/spec/models/new_lang_enum_spec.rb +30 -0
  258. data/spec/models/notification_enum_spec.rb +30 -0
  259. data/spec/models/notification_spec.rb +66 -0
  260. data/spec/models/operation_enum_spec.rb +30 -0
  261. data/spec/models/paginated_addon_list_spec.rb +54 -0
  262. data/spec/models/paginated_basic_user_list_spec.rb +54 -0
  263. data/spec/models/paginated_category_list_spec.rb +54 -0
  264. data/spec/models/paginated_change_list_spec.rb +54 -0
  265. data/spec/models/paginated_component_list_list_spec.rb +54 -0
  266. data/spec/models/paginated_component_list_spec.rb +54 -0
  267. data/spec/models/paginated_group_list_spec.rb +54 -0
  268. data/spec/models/paginated_language_list_spec.rb +54 -0
  269. data/spec/models/paginated_memory_list_spec.rb +54 -0
  270. data/spec/models/paginated_notification_list_spec.rb +54 -0
  271. data/spec/models/paginated_project_list_spec.rb +54 -0
  272. data/spec/models/paginated_role_list_spec.rb +54 -0
  273. data/spec/models/paginated_screenshot_list_spec.rb +54 -0
  274. data/spec/models/paginated_translation_list_spec.rb +54 -0
  275. data/spec/models/paginated_unit_list_spec.rb +54 -0
  276. data/spec/models/patched_addon_spec.rb +66 -0
  277. data/spec/models/patched_basic_user_spec.rb +48 -0
  278. data/spec/models/patched_category_spec.rb +72 -0
  279. data/spec/models/patched_component_list_spec.rb +72 -0
  280. data/spec/models/patched_component_spec.rb +420 -0
  281. data/spec/models/patched_group_spec.rb +102 -0
  282. data/spec/models/patched_language_spec.rb +90 -0
  283. data/spec/models/patched_memory_spec.rb +84 -0
  284. data/spec/models/patched_notification_spec.rb +66 -0
  285. data/spec/models/patched_project_spec.rb +156 -0
  286. data/spec/models/patched_role_spec.rb +54 -0
  287. data/spec/models/patched_screenshot_spec.rb +72 -0
  288. data/spec/models/patched_unit_write_spec.rb +60 -0
  289. data/spec/models/priority_enum_spec.rb +30 -0
  290. data/spec/models/project_selection_enum_spec.rb +30 -0
  291. data/spec/models/project_spec.rb +156 -0
  292. data/spec/models/repo_request_spec.rb +36 -0
  293. data/spec/models/role_spec.rb +54 -0
  294. data/spec/models/scope_enum_spec.rb +30 -0
  295. data/spec/models/screenshot_file_spec.rb +36 -0
  296. data/spec/models/screenshot_spec.rb +72 -0
  297. data/spec/models/source_enum_spec.rb +30 -0
  298. data/spec/models/state_enum_spec.rb +30 -0
  299. data/spec/models/text_direction_spec.rb +32 -0
  300. data/spec/models/translation_spec.rb +222 -0
  301. data/spec/models/unit_flat_labels_spec.rb +54 -0
  302. data/spec/models/unit_labels_spec.rb +54 -0
  303. data/spec/models/unit_spec.rb +210 -0
  304. data/spec/models/unit_write_spec.rb +60 -0
  305. data/spec/models/upload_request_conflicts_spec.rb +32 -0
  306. data/spec/models/upload_request_fuzzy_spec.rb +32 -0
  307. data/spec/models/upload_request_spec.rb +66 -0
  308. data/spec/models/vcs_enum_spec.rb +30 -0
  309. data/spec/spec_helper.rb +111 -0
  310. data/weblate.gemspec +47 -0
  311. metadata +526 -0
@@ -0,0 +1,1775 @@
1
+ =begin
2
+ #Weblate's REST API
3
+
4
+ # The API is accessible on the ``/api/`` URL and it is based on [Django REST framework](https://www.django-rest-framework.org/). The OpenAPI specification is available as feature preview, feedback welcome!
5
+
6
+ The version of the OpenAPI document:
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Weblate
16
+ class ComponentsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Translation components API.
23
+ # @param project__slug [String]
24
+ # @param slug [String]
25
+ # @param component [Component]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Component]
28
+ def components_addons_create(project__slug, slug, component, opts = {})
29
+ data, _status_code, _headers = components_addons_create_with_http_info(project__slug, slug, component, opts)
30
+ data
31
+ end
32
+
33
+ # Translation components API.
34
+ # @param project__slug [String]
35
+ # @param slug [String]
36
+ # @param component [Component]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
39
+ def components_addons_create_with_http_info(project__slug, slug, component, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_addons_create ...'
42
+ end
43
+ # verify the required parameter 'project__slug' is set
44
+ if @api_client.config.client_side_validation && project__slug.nil?
45
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_addons_create"
46
+ end
47
+ pattern = Regexp.new(/^[^\/]+$/)
48
+ if @api_client.config.client_side_validation && project__slug !~ pattern
49
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_addons_create, must conform to the pattern #{pattern}."
50
+ end
51
+
52
+ # verify the required parameter 'slug' is set
53
+ if @api_client.config.client_side_validation && slug.nil?
54
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_addons_create"
55
+ end
56
+ pattern = Regexp.new(/^[^\/]+$/)
57
+ if @api_client.config.client_side_validation && slug !~ pattern
58
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_addons_create, must conform to the pattern #{pattern}."
59
+ end
60
+
61
+ # verify the required parameter 'component' is set
62
+ if @api_client.config.client_side_validation && component.nil?
63
+ fail ArgumentError, "Missing the required parameter 'component' when calling ComponentsApi.components_addons_create"
64
+ end
65
+ # resource path
66
+ local_var_path = '/components/{project__slug}/{slug}/addons/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
67
+
68
+ # query parameters
69
+ query_params = opts[:query_params] || {}
70
+
71
+ # header parameters
72
+ header_params = opts[:header_params] || {}
73
+ # HTTP header 'Accept' (if needed)
74
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
75
+ # HTTP header 'Content-Type'
76
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
77
+ if !content_type.nil?
78
+ header_params['Content-Type'] = content_type
79
+ end
80
+
81
+ # form parameters
82
+ form_params = opts[:form_params] || {}
83
+
84
+ # http body (model)
85
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(component)
86
+
87
+ # return_type
88
+ return_type = opts[:debug_return_type] || 'Component'
89
+
90
+ # auth_names
91
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
92
+
93
+ new_options = opts.merge(
94
+ :operation => :"ComponentsApi.components_addons_create",
95
+ :header_params => header_params,
96
+ :query_params => query_params,
97
+ :form_params => form_params,
98
+ :body => post_body,
99
+ :auth_names => auth_names,
100
+ :return_type => return_type
101
+ )
102
+
103
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug "API called: ComponentsApi#components_addons_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
106
+ end
107
+ return data, status_code, headers
108
+ end
109
+
110
+ # Translation components API.
111
+ # @param project__slug [String]
112
+ # @param slug [String]
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [Component]
115
+ def components_changes_retrieve(project__slug, slug, opts = {})
116
+ data, _status_code, _headers = components_changes_retrieve_with_http_info(project__slug, slug, opts)
117
+ data
118
+ end
119
+
120
+ # Translation components API.
121
+ # @param project__slug [String]
122
+ # @param slug [String]
123
+ # @param [Hash] opts the optional parameters
124
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
125
+ def components_changes_retrieve_with_http_info(project__slug, slug, opts = {})
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_changes_retrieve ...'
128
+ end
129
+ # verify the required parameter 'project__slug' is set
130
+ if @api_client.config.client_side_validation && project__slug.nil?
131
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_changes_retrieve"
132
+ end
133
+ pattern = Regexp.new(/^[^\/]+$/)
134
+ if @api_client.config.client_side_validation && project__slug !~ pattern
135
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_changes_retrieve, must conform to the pattern #{pattern}."
136
+ end
137
+
138
+ # verify the required parameter 'slug' is set
139
+ if @api_client.config.client_side_validation && slug.nil?
140
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_changes_retrieve"
141
+ end
142
+ pattern = Regexp.new(/^[^\/]+$/)
143
+ if @api_client.config.client_side_validation && slug !~ pattern
144
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_changes_retrieve, must conform to the pattern #{pattern}."
145
+ end
146
+
147
+ # resource path
148
+ local_var_path = '/components/{project__slug}/{slug}/changes/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
149
+
150
+ # query parameters
151
+ query_params = opts[:query_params] || {}
152
+
153
+ # header parameters
154
+ header_params = opts[:header_params] || {}
155
+ # HTTP header 'Accept' (if needed)
156
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
157
+
158
+ # form parameters
159
+ form_params = opts[:form_params] || {}
160
+
161
+ # http body (model)
162
+ post_body = opts[:debug_body]
163
+
164
+ # return_type
165
+ return_type = opts[:debug_return_type] || 'Component'
166
+
167
+ # auth_names
168
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
169
+
170
+ new_options = opts.merge(
171
+ :operation => :"ComponentsApi.components_changes_retrieve",
172
+ :header_params => header_params,
173
+ :query_params => query_params,
174
+ :form_params => form_params,
175
+ :body => post_body,
176
+ :auth_names => auth_names,
177
+ :return_type => return_type
178
+ )
179
+
180
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "API called: ComponentsApi#components_changes_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ return data, status_code, headers
185
+ end
186
+
187
+ # Translation components API.
188
+ # @param project__slug [String]
189
+ # @param slug [String]
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [Component]
192
+ def components_credits_retrieve(project__slug, slug, opts = {})
193
+ data, _status_code, _headers = components_credits_retrieve_with_http_info(project__slug, slug, opts)
194
+ data
195
+ end
196
+
197
+ # Translation components API.
198
+ # @param project__slug [String]
199
+ # @param slug [String]
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
202
+ def components_credits_retrieve_with_http_info(project__slug, slug, opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_credits_retrieve ...'
205
+ end
206
+ # verify the required parameter 'project__slug' is set
207
+ if @api_client.config.client_side_validation && project__slug.nil?
208
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_credits_retrieve"
209
+ end
210
+ pattern = Regexp.new(/^[^\/]+$/)
211
+ if @api_client.config.client_side_validation && project__slug !~ pattern
212
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_credits_retrieve, must conform to the pattern #{pattern}."
213
+ end
214
+
215
+ # verify the required parameter 'slug' is set
216
+ if @api_client.config.client_side_validation && slug.nil?
217
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_credits_retrieve"
218
+ end
219
+ pattern = Regexp.new(/^[^\/]+$/)
220
+ if @api_client.config.client_side_validation && slug !~ pattern
221
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_credits_retrieve, must conform to the pattern #{pattern}."
222
+ end
223
+
224
+ # resource path
225
+ local_var_path = '/components/{project__slug}/{slug}/credits/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
226
+
227
+ # query parameters
228
+ query_params = opts[:query_params] || {}
229
+
230
+ # header parameters
231
+ header_params = opts[:header_params] || {}
232
+ # HTTP header 'Accept' (if needed)
233
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
234
+
235
+ # form parameters
236
+ form_params = opts[:form_params] || {}
237
+
238
+ # http body (model)
239
+ post_body = opts[:debug_body]
240
+
241
+ # return_type
242
+ return_type = opts[:debug_return_type] || 'Component'
243
+
244
+ # auth_names
245
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
246
+
247
+ new_options = opts.merge(
248
+ :operation => :"ComponentsApi.components_credits_retrieve",
249
+ :header_params => header_params,
250
+ :query_params => query_params,
251
+ :form_params => form_params,
252
+ :body => post_body,
253
+ :auth_names => auth_names,
254
+ :return_type => return_type
255
+ )
256
+
257
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug "API called: ComponentsApi#components_credits_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
260
+ end
261
+ return data, status_code, headers
262
+ end
263
+
264
+ # Translation components API.
265
+ # @param project__slug [String]
266
+ # @param slug [String]
267
+ # @param [Hash] opts the optional parameters
268
+ # @return [nil]
269
+ def components_destroy(project__slug, slug, opts = {})
270
+ components_destroy_with_http_info(project__slug, slug, opts)
271
+ nil
272
+ end
273
+
274
+ # Translation components API.
275
+ # @param project__slug [String]
276
+ # @param slug [String]
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
279
+ def components_destroy_with_http_info(project__slug, slug, opts = {})
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_destroy ...'
282
+ end
283
+ # verify the required parameter 'project__slug' is set
284
+ if @api_client.config.client_side_validation && project__slug.nil?
285
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_destroy"
286
+ end
287
+ pattern = Regexp.new(/^[^\/]+$/)
288
+ if @api_client.config.client_side_validation && project__slug !~ pattern
289
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_destroy, must conform to the pattern #{pattern}."
290
+ end
291
+
292
+ # verify the required parameter 'slug' is set
293
+ if @api_client.config.client_side_validation && slug.nil?
294
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_destroy"
295
+ end
296
+ pattern = Regexp.new(/^[^\/]+$/)
297
+ if @api_client.config.client_side_validation && slug !~ pattern
298
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_destroy, must conform to the pattern #{pattern}."
299
+ end
300
+
301
+ # resource path
302
+ local_var_path = '/components/{project__slug}/{slug}/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
303
+
304
+ # query parameters
305
+ query_params = opts[:query_params] || {}
306
+
307
+ # header parameters
308
+ header_params = opts[:header_params] || {}
309
+
310
+ # form parameters
311
+ form_params = opts[:form_params] || {}
312
+
313
+ # http body (model)
314
+ post_body = opts[:debug_body]
315
+
316
+ # return_type
317
+ return_type = opts[:debug_return_type]
318
+
319
+ # auth_names
320
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
321
+
322
+ new_options = opts.merge(
323
+ :operation => :"ComponentsApi.components_destroy",
324
+ :header_params => header_params,
325
+ :query_params => query_params,
326
+ :form_params => form_params,
327
+ :body => post_body,
328
+ :auth_names => auth_names,
329
+ :return_type => return_type
330
+ )
331
+
332
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug "API called: ComponentsApi#components_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
335
+ end
336
+ return data, status_code, headers
337
+ end
338
+
339
+ # Translation components API.
340
+ # @param project__slug [String]
341
+ # @param slug [String]
342
+ # @param [Hash] opts the optional parameters
343
+ # @return [Component]
344
+ def components_file_retrieve(project__slug, slug, opts = {})
345
+ data, _status_code, _headers = components_file_retrieve_with_http_info(project__slug, slug, opts)
346
+ data
347
+ end
348
+
349
+ # Translation components API.
350
+ # @param project__slug [String]
351
+ # @param slug [String]
352
+ # @param [Hash] opts the optional parameters
353
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
354
+ def components_file_retrieve_with_http_info(project__slug, slug, opts = {})
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_file_retrieve ...'
357
+ end
358
+ # verify the required parameter 'project__slug' is set
359
+ if @api_client.config.client_side_validation && project__slug.nil?
360
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_file_retrieve"
361
+ end
362
+ pattern = Regexp.new(/^[^\/]+$/)
363
+ if @api_client.config.client_side_validation && project__slug !~ pattern
364
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_file_retrieve, must conform to the pattern #{pattern}."
365
+ end
366
+
367
+ # verify the required parameter 'slug' is set
368
+ if @api_client.config.client_side_validation && slug.nil?
369
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_file_retrieve"
370
+ end
371
+ pattern = Regexp.new(/^[^\/]+$/)
372
+ if @api_client.config.client_side_validation && slug !~ pattern
373
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_file_retrieve, must conform to the pattern #{pattern}."
374
+ end
375
+
376
+ # resource path
377
+ local_var_path = '/components/{project__slug}/{slug}/file/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
378
+
379
+ # query parameters
380
+ query_params = opts[:query_params] || {}
381
+
382
+ # header parameters
383
+ header_params = opts[:header_params] || {}
384
+ # HTTP header 'Accept' (if needed)
385
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
386
+
387
+ # form parameters
388
+ form_params = opts[:form_params] || {}
389
+
390
+ # http body (model)
391
+ post_body = opts[:debug_body]
392
+
393
+ # return_type
394
+ return_type = opts[:debug_return_type] || 'Component'
395
+
396
+ # auth_names
397
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
398
+
399
+ new_options = opts.merge(
400
+ :operation => :"ComponentsApi.components_file_retrieve",
401
+ :header_params => header_params,
402
+ :query_params => query_params,
403
+ :form_params => form_params,
404
+ :body => post_body,
405
+ :auth_names => auth_names,
406
+ :return_type => return_type
407
+ )
408
+
409
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug "API called: ComponentsApi#components_file_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
412
+ end
413
+ return data, status_code, headers
414
+ end
415
+
416
+ # Translation components API.
417
+ # @param project__slug [String]
418
+ # @param slug [String]
419
+ # @param component [Component]
420
+ # @param [Hash] opts the optional parameters
421
+ # @return [Component]
422
+ def components_links_create(project__slug, slug, component, opts = {})
423
+ data, _status_code, _headers = components_links_create_with_http_info(project__slug, slug, component, opts)
424
+ data
425
+ end
426
+
427
+ # Translation components API.
428
+ # @param project__slug [String]
429
+ # @param slug [String]
430
+ # @param component [Component]
431
+ # @param [Hash] opts the optional parameters
432
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
433
+ def components_links_create_with_http_info(project__slug, slug, component, opts = {})
434
+ if @api_client.config.debugging
435
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_links_create ...'
436
+ end
437
+ # verify the required parameter 'project__slug' is set
438
+ if @api_client.config.client_side_validation && project__slug.nil?
439
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_links_create"
440
+ end
441
+ pattern = Regexp.new(/^[^\/]+$/)
442
+ if @api_client.config.client_side_validation && project__slug !~ pattern
443
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_links_create, must conform to the pattern #{pattern}."
444
+ end
445
+
446
+ # verify the required parameter 'slug' is set
447
+ if @api_client.config.client_side_validation && slug.nil?
448
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_links_create"
449
+ end
450
+ pattern = Regexp.new(/^[^\/]+$/)
451
+ if @api_client.config.client_side_validation && slug !~ pattern
452
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_links_create, must conform to the pattern #{pattern}."
453
+ end
454
+
455
+ # verify the required parameter 'component' is set
456
+ if @api_client.config.client_side_validation && component.nil?
457
+ fail ArgumentError, "Missing the required parameter 'component' when calling ComponentsApi.components_links_create"
458
+ end
459
+ # resource path
460
+ local_var_path = '/components/{project__slug}/{slug}/links/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
461
+
462
+ # query parameters
463
+ query_params = opts[:query_params] || {}
464
+
465
+ # header parameters
466
+ header_params = opts[:header_params] || {}
467
+ # HTTP header 'Accept' (if needed)
468
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
469
+ # HTTP header 'Content-Type'
470
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
471
+ if !content_type.nil?
472
+ header_params['Content-Type'] = content_type
473
+ end
474
+
475
+ # form parameters
476
+ form_params = opts[:form_params] || {}
477
+
478
+ # http body (model)
479
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(component)
480
+
481
+ # return_type
482
+ return_type = opts[:debug_return_type] || 'Component'
483
+
484
+ # auth_names
485
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
486
+
487
+ new_options = opts.merge(
488
+ :operation => :"ComponentsApi.components_links_create",
489
+ :header_params => header_params,
490
+ :query_params => query_params,
491
+ :form_params => form_params,
492
+ :body => post_body,
493
+ :auth_names => auth_names,
494
+ :return_type => return_type
495
+ )
496
+
497
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
498
+ if @api_client.config.debugging
499
+ @api_client.config.logger.debug "API called: ComponentsApi#components_links_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
500
+ end
501
+ return data, status_code, headers
502
+ end
503
+
504
+ # Translation components API.
505
+ # @param project__slug [String]
506
+ # @param project_slug [String]
507
+ # @param slug [String]
508
+ # @param [Hash] opts the optional parameters
509
+ # @return [nil]
510
+ def components_links_destroy(project__slug, project_slug, slug, opts = {})
511
+ components_links_destroy_with_http_info(project__slug, project_slug, slug, opts)
512
+ nil
513
+ end
514
+
515
+ # Translation components API.
516
+ # @param project__slug [String]
517
+ # @param project_slug [String]
518
+ # @param slug [String]
519
+ # @param [Hash] opts the optional parameters
520
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
521
+ def components_links_destroy_with_http_info(project__slug, project_slug, slug, opts = {})
522
+ if @api_client.config.debugging
523
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_links_destroy ...'
524
+ end
525
+ # verify the required parameter 'project__slug' is set
526
+ if @api_client.config.client_side_validation && project__slug.nil?
527
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_links_destroy"
528
+ end
529
+ pattern = Regexp.new(/^[^\/]+$/)
530
+ if @api_client.config.client_side_validation && project__slug !~ pattern
531
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_links_destroy, must conform to the pattern #{pattern}."
532
+ end
533
+
534
+ # verify the required parameter 'project_slug' is set
535
+ if @api_client.config.client_side_validation && project_slug.nil?
536
+ fail ArgumentError, "Missing the required parameter 'project_slug' when calling ComponentsApi.components_links_destroy"
537
+ end
538
+ # verify the required parameter 'slug' is set
539
+ if @api_client.config.client_side_validation && slug.nil?
540
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_links_destroy"
541
+ end
542
+ pattern = Regexp.new(/^[^\/]+$/)
543
+ if @api_client.config.client_side_validation && slug !~ pattern
544
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_links_destroy, must conform to the pattern #{pattern}."
545
+ end
546
+
547
+ # resource path
548
+ local_var_path = '/components/{project__slug}/{slug}/links/{project_slug}/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'project_slug' + '}', CGI.escape(project_slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
549
+
550
+ # query parameters
551
+ query_params = opts[:query_params] || {}
552
+
553
+ # header parameters
554
+ header_params = opts[:header_params] || {}
555
+
556
+ # form parameters
557
+ form_params = opts[:form_params] || {}
558
+
559
+ # http body (model)
560
+ post_body = opts[:debug_body]
561
+
562
+ # return_type
563
+ return_type = opts[:debug_return_type]
564
+
565
+ # auth_names
566
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
567
+
568
+ new_options = opts.merge(
569
+ :operation => :"ComponentsApi.components_links_destroy",
570
+ :header_params => header_params,
571
+ :query_params => query_params,
572
+ :form_params => form_params,
573
+ :body => post_body,
574
+ :auth_names => auth_names,
575
+ :return_type => return_type
576
+ )
577
+
578
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
579
+ if @api_client.config.debugging
580
+ @api_client.config.logger.debug "API called: ComponentsApi#components_links_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
581
+ end
582
+ return data, status_code, headers
583
+ end
584
+
585
+ # Translation components API.
586
+ # @param project__slug [String]
587
+ # @param slug [String]
588
+ # @param [Hash] opts the optional parameters
589
+ # @return [Component]
590
+ def components_links_retrieve(project__slug, slug, opts = {})
591
+ data, _status_code, _headers = components_links_retrieve_with_http_info(project__slug, slug, opts)
592
+ data
593
+ end
594
+
595
+ # Translation components API.
596
+ # @param project__slug [String]
597
+ # @param slug [String]
598
+ # @param [Hash] opts the optional parameters
599
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
600
+ def components_links_retrieve_with_http_info(project__slug, slug, opts = {})
601
+ if @api_client.config.debugging
602
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_links_retrieve ...'
603
+ end
604
+ # verify the required parameter 'project__slug' is set
605
+ if @api_client.config.client_side_validation && project__slug.nil?
606
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_links_retrieve"
607
+ end
608
+ pattern = Regexp.new(/^[^\/]+$/)
609
+ if @api_client.config.client_side_validation && project__slug !~ pattern
610
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_links_retrieve, must conform to the pattern #{pattern}."
611
+ end
612
+
613
+ # verify the required parameter 'slug' is set
614
+ if @api_client.config.client_side_validation && slug.nil?
615
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_links_retrieve"
616
+ end
617
+ pattern = Regexp.new(/^[^\/]+$/)
618
+ if @api_client.config.client_side_validation && slug !~ pattern
619
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_links_retrieve, must conform to the pattern #{pattern}."
620
+ end
621
+
622
+ # resource path
623
+ local_var_path = '/components/{project__slug}/{slug}/links/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
624
+
625
+ # query parameters
626
+ query_params = opts[:query_params] || {}
627
+
628
+ # header parameters
629
+ header_params = opts[:header_params] || {}
630
+ # HTTP header 'Accept' (if needed)
631
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
632
+
633
+ # form parameters
634
+ form_params = opts[:form_params] || {}
635
+
636
+ # http body (model)
637
+ post_body = opts[:debug_body]
638
+
639
+ # return_type
640
+ return_type = opts[:debug_return_type] || 'Component'
641
+
642
+ # auth_names
643
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
644
+
645
+ new_options = opts.merge(
646
+ :operation => :"ComponentsApi.components_links_retrieve",
647
+ :header_params => header_params,
648
+ :query_params => query_params,
649
+ :form_params => form_params,
650
+ :body => post_body,
651
+ :auth_names => auth_names,
652
+ :return_type => return_type
653
+ )
654
+
655
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
656
+ if @api_client.config.debugging
657
+ @api_client.config.logger.debug "API called: ComponentsApi#components_links_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
658
+ end
659
+ return data, status_code, headers
660
+ end
661
+
662
+ # Translation components API.
663
+ # @param [Hash] opts the optional parameters
664
+ # @option opts [Integer] :page A page number within the paginated result set.
665
+ # @option opts [Integer] :page_size Number of results to return per page.
666
+ # @return [PaginatedComponentList]
667
+ def components_list(opts = {})
668
+ data, _status_code, _headers = components_list_with_http_info(opts)
669
+ data
670
+ end
671
+
672
+ # Translation components API.
673
+ # @param [Hash] opts the optional parameters
674
+ # @option opts [Integer] :page A page number within the paginated result set.
675
+ # @option opts [Integer] :page_size Number of results to return per page.
676
+ # @return [Array<(PaginatedComponentList, Integer, Hash)>] PaginatedComponentList data, response status code and response headers
677
+ def components_list_with_http_info(opts = {})
678
+ if @api_client.config.debugging
679
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_list ...'
680
+ end
681
+ # resource path
682
+ local_var_path = '/components/'
683
+
684
+ # query parameters
685
+ query_params = opts[:query_params] || {}
686
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
687
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
688
+
689
+ # header parameters
690
+ header_params = opts[:header_params] || {}
691
+ # HTTP header 'Accept' (if needed)
692
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
693
+
694
+ # form parameters
695
+ form_params = opts[:form_params] || {}
696
+
697
+ # http body (model)
698
+ post_body = opts[:debug_body]
699
+
700
+ # return_type
701
+ return_type = opts[:debug_return_type] || 'PaginatedComponentList'
702
+
703
+ # auth_names
704
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
705
+
706
+ new_options = opts.merge(
707
+ :operation => :"ComponentsApi.components_list",
708
+ :header_params => header_params,
709
+ :query_params => query_params,
710
+ :form_params => form_params,
711
+ :body => post_body,
712
+ :auth_names => auth_names,
713
+ :return_type => return_type
714
+ )
715
+
716
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug "API called: ComponentsApi#components_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
719
+ end
720
+ return data, status_code, headers
721
+ end
722
+
723
+ # Translation components API.
724
+ # @param project__slug [String]
725
+ # @param slug [String]
726
+ # @param lock_request [LockRequest]
727
+ # @param [Hash] opts the optional parameters
728
+ # @return [LockRequest]
729
+ def components_lock_create(project__slug, slug, lock_request, opts = {})
730
+ data, _status_code, _headers = components_lock_create_with_http_info(project__slug, slug, lock_request, opts)
731
+ data
732
+ end
733
+
734
+ # Translation components API.
735
+ # @param project__slug [String]
736
+ # @param slug [String]
737
+ # @param lock_request [LockRequest]
738
+ # @param [Hash] opts the optional parameters
739
+ # @return [Array<(LockRequest, Integer, Hash)>] LockRequest data, response status code and response headers
740
+ def components_lock_create_with_http_info(project__slug, slug, lock_request, opts = {})
741
+ if @api_client.config.debugging
742
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_lock_create ...'
743
+ end
744
+ # verify the required parameter 'project__slug' is set
745
+ if @api_client.config.client_side_validation && project__slug.nil?
746
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_lock_create"
747
+ end
748
+ pattern = Regexp.new(/^[^\/]+$/)
749
+ if @api_client.config.client_side_validation && project__slug !~ pattern
750
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_lock_create, must conform to the pattern #{pattern}."
751
+ end
752
+
753
+ # verify the required parameter 'slug' is set
754
+ if @api_client.config.client_side_validation && slug.nil?
755
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_lock_create"
756
+ end
757
+ pattern = Regexp.new(/^[^\/]+$/)
758
+ if @api_client.config.client_side_validation && slug !~ pattern
759
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_lock_create, must conform to the pattern #{pattern}."
760
+ end
761
+
762
+ # verify the required parameter 'lock_request' is set
763
+ if @api_client.config.client_side_validation && lock_request.nil?
764
+ fail ArgumentError, "Missing the required parameter 'lock_request' when calling ComponentsApi.components_lock_create"
765
+ end
766
+ # resource path
767
+ local_var_path = '/components/{project__slug}/{slug}/lock/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
768
+
769
+ # query parameters
770
+ query_params = opts[:query_params] || {}
771
+
772
+ # header parameters
773
+ header_params = opts[:header_params] || {}
774
+ # HTTP header 'Accept' (if needed)
775
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
776
+ # HTTP header 'Content-Type'
777
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
778
+ if !content_type.nil?
779
+ header_params['Content-Type'] = content_type
780
+ end
781
+
782
+ # form parameters
783
+ form_params = opts[:form_params] || {}
784
+
785
+ # http body (model)
786
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lock_request)
787
+
788
+ # return_type
789
+ return_type = opts[:debug_return_type] || 'LockRequest'
790
+
791
+ # auth_names
792
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
793
+
794
+ new_options = opts.merge(
795
+ :operation => :"ComponentsApi.components_lock_create",
796
+ :header_params => header_params,
797
+ :query_params => query_params,
798
+ :form_params => form_params,
799
+ :body => post_body,
800
+ :auth_names => auth_names,
801
+ :return_type => return_type
802
+ )
803
+
804
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
805
+ if @api_client.config.debugging
806
+ @api_client.config.logger.debug "API called: ComponentsApi#components_lock_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
807
+ end
808
+ return data, status_code, headers
809
+ end
810
+
811
+ # Translation components API.
812
+ # @param project__slug [String]
813
+ # @param slug [String]
814
+ # @param [Hash] opts the optional parameters
815
+ # @return [LockRequest]
816
+ def components_lock_retrieve(project__slug, slug, opts = {})
817
+ data, _status_code, _headers = components_lock_retrieve_with_http_info(project__slug, slug, opts)
818
+ data
819
+ end
820
+
821
+ # Translation components API.
822
+ # @param project__slug [String]
823
+ # @param slug [String]
824
+ # @param [Hash] opts the optional parameters
825
+ # @return [Array<(LockRequest, Integer, Hash)>] LockRequest data, response status code and response headers
826
+ def components_lock_retrieve_with_http_info(project__slug, slug, opts = {})
827
+ if @api_client.config.debugging
828
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_lock_retrieve ...'
829
+ end
830
+ # verify the required parameter 'project__slug' is set
831
+ if @api_client.config.client_side_validation && project__slug.nil?
832
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_lock_retrieve"
833
+ end
834
+ pattern = Regexp.new(/^[^\/]+$/)
835
+ if @api_client.config.client_side_validation && project__slug !~ pattern
836
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_lock_retrieve, must conform to the pattern #{pattern}."
837
+ end
838
+
839
+ # verify the required parameter 'slug' is set
840
+ if @api_client.config.client_side_validation && slug.nil?
841
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_lock_retrieve"
842
+ end
843
+ pattern = Regexp.new(/^[^\/]+$/)
844
+ if @api_client.config.client_side_validation && slug !~ pattern
845
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_lock_retrieve, must conform to the pattern #{pattern}."
846
+ end
847
+
848
+ # resource path
849
+ local_var_path = '/components/{project__slug}/{slug}/lock/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
850
+
851
+ # query parameters
852
+ query_params = opts[:query_params] || {}
853
+
854
+ # header parameters
855
+ header_params = opts[:header_params] || {}
856
+ # HTTP header 'Accept' (if needed)
857
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
858
+
859
+ # form parameters
860
+ form_params = opts[:form_params] || {}
861
+
862
+ # http body (model)
863
+ post_body = opts[:debug_body]
864
+
865
+ # return_type
866
+ return_type = opts[:debug_return_type] || 'LockRequest'
867
+
868
+ # auth_names
869
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
870
+
871
+ new_options = opts.merge(
872
+ :operation => :"ComponentsApi.components_lock_retrieve",
873
+ :header_params => header_params,
874
+ :query_params => query_params,
875
+ :form_params => form_params,
876
+ :body => post_body,
877
+ :auth_names => auth_names,
878
+ :return_type => return_type
879
+ )
880
+
881
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
882
+ if @api_client.config.debugging
883
+ @api_client.config.logger.debug "API called: ComponentsApi#components_lock_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
884
+ end
885
+ return data, status_code, headers
886
+ end
887
+
888
+ # Translation components API.
889
+ # @param project__slug [String]
890
+ # @param slug [String]
891
+ # @param [Hash] opts the optional parameters
892
+ # @return [Component]
893
+ def components_monolingual_base_retrieve(project__slug, slug, opts = {})
894
+ data, _status_code, _headers = components_monolingual_base_retrieve_with_http_info(project__slug, slug, opts)
895
+ data
896
+ end
897
+
898
+ # Translation components API.
899
+ # @param project__slug [String]
900
+ # @param slug [String]
901
+ # @param [Hash] opts the optional parameters
902
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
903
+ def components_monolingual_base_retrieve_with_http_info(project__slug, slug, opts = {})
904
+ if @api_client.config.debugging
905
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_monolingual_base_retrieve ...'
906
+ end
907
+ # verify the required parameter 'project__slug' is set
908
+ if @api_client.config.client_side_validation && project__slug.nil?
909
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_monolingual_base_retrieve"
910
+ end
911
+ pattern = Regexp.new(/^[^\/]+$/)
912
+ if @api_client.config.client_side_validation && project__slug !~ pattern
913
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_monolingual_base_retrieve, must conform to the pattern #{pattern}."
914
+ end
915
+
916
+ # verify the required parameter 'slug' is set
917
+ if @api_client.config.client_side_validation && slug.nil?
918
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_monolingual_base_retrieve"
919
+ end
920
+ pattern = Regexp.new(/^[^\/]+$/)
921
+ if @api_client.config.client_side_validation && slug !~ pattern
922
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_monolingual_base_retrieve, must conform to the pattern #{pattern}."
923
+ end
924
+
925
+ # resource path
926
+ local_var_path = '/components/{project__slug}/{slug}/monolingual_base/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
927
+
928
+ # query parameters
929
+ query_params = opts[:query_params] || {}
930
+
931
+ # header parameters
932
+ header_params = opts[:header_params] || {}
933
+ # HTTP header 'Accept' (if needed)
934
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
935
+
936
+ # form parameters
937
+ form_params = opts[:form_params] || {}
938
+
939
+ # http body (model)
940
+ post_body = opts[:debug_body]
941
+
942
+ # return_type
943
+ return_type = opts[:debug_return_type] || 'Component'
944
+
945
+ # auth_names
946
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
947
+
948
+ new_options = opts.merge(
949
+ :operation => :"ComponentsApi.components_monolingual_base_retrieve",
950
+ :header_params => header_params,
951
+ :query_params => query_params,
952
+ :form_params => form_params,
953
+ :body => post_body,
954
+ :auth_names => auth_names,
955
+ :return_type => return_type
956
+ )
957
+
958
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
959
+ if @api_client.config.debugging
960
+ @api_client.config.logger.debug "API called: ComponentsApi#components_monolingual_base_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
961
+ end
962
+ return data, status_code, headers
963
+ end
964
+
965
+ # Translation components API.
966
+ # @param project__slug [String]
967
+ # @param slug [String]
968
+ # @param [Hash] opts the optional parameters
969
+ # @return [Component]
970
+ def components_new_template_retrieve(project__slug, slug, opts = {})
971
+ data, _status_code, _headers = components_new_template_retrieve_with_http_info(project__slug, slug, opts)
972
+ data
973
+ end
974
+
975
+ # Translation components API.
976
+ # @param project__slug [String]
977
+ # @param slug [String]
978
+ # @param [Hash] opts the optional parameters
979
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
980
+ def components_new_template_retrieve_with_http_info(project__slug, slug, opts = {})
981
+ if @api_client.config.debugging
982
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_new_template_retrieve ...'
983
+ end
984
+ # verify the required parameter 'project__slug' is set
985
+ if @api_client.config.client_side_validation && project__slug.nil?
986
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_new_template_retrieve"
987
+ end
988
+ pattern = Regexp.new(/^[^\/]+$/)
989
+ if @api_client.config.client_side_validation && project__slug !~ pattern
990
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_new_template_retrieve, must conform to the pattern #{pattern}."
991
+ end
992
+
993
+ # verify the required parameter 'slug' is set
994
+ if @api_client.config.client_side_validation && slug.nil?
995
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_new_template_retrieve"
996
+ end
997
+ pattern = Regexp.new(/^[^\/]+$/)
998
+ if @api_client.config.client_side_validation && slug !~ pattern
999
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_new_template_retrieve, must conform to the pattern #{pattern}."
1000
+ end
1001
+
1002
+ # resource path
1003
+ local_var_path = '/components/{project__slug}/{slug}/new_template/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1004
+
1005
+ # query parameters
1006
+ query_params = opts[:query_params] || {}
1007
+
1008
+ # header parameters
1009
+ header_params = opts[:header_params] || {}
1010
+ # HTTP header 'Accept' (if needed)
1011
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1012
+
1013
+ # form parameters
1014
+ form_params = opts[:form_params] || {}
1015
+
1016
+ # http body (model)
1017
+ post_body = opts[:debug_body]
1018
+
1019
+ # return_type
1020
+ return_type = opts[:debug_return_type] || 'Component'
1021
+
1022
+ # auth_names
1023
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1024
+
1025
+ new_options = opts.merge(
1026
+ :operation => :"ComponentsApi.components_new_template_retrieve",
1027
+ :header_params => header_params,
1028
+ :query_params => query_params,
1029
+ :form_params => form_params,
1030
+ :body => post_body,
1031
+ :auth_names => auth_names,
1032
+ :return_type => return_type
1033
+ )
1034
+
1035
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1036
+ if @api_client.config.debugging
1037
+ @api_client.config.logger.debug "API called: ComponentsApi#components_new_template_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1038
+ end
1039
+ return data, status_code, headers
1040
+ end
1041
+
1042
+ # Translation components API.
1043
+ # @param project__slug [String]
1044
+ # @param slug [String]
1045
+ # @param [Hash] opts the optional parameters
1046
+ # @option opts [PatchedComponent] :patched_component
1047
+ # @return [Component]
1048
+ def components_partial_update(project__slug, slug, opts = {})
1049
+ data, _status_code, _headers = components_partial_update_with_http_info(project__slug, slug, opts)
1050
+ data
1051
+ end
1052
+
1053
+ # Translation components API.
1054
+ # @param project__slug [String]
1055
+ # @param slug [String]
1056
+ # @param [Hash] opts the optional parameters
1057
+ # @option opts [PatchedComponent] :patched_component
1058
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1059
+ def components_partial_update_with_http_info(project__slug, slug, opts = {})
1060
+ if @api_client.config.debugging
1061
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_partial_update ...'
1062
+ end
1063
+ # verify the required parameter 'project__slug' is set
1064
+ if @api_client.config.client_side_validation && project__slug.nil?
1065
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_partial_update"
1066
+ end
1067
+ pattern = Regexp.new(/^[^\/]+$/)
1068
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1069
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_partial_update, must conform to the pattern #{pattern}."
1070
+ end
1071
+
1072
+ # verify the required parameter 'slug' is set
1073
+ if @api_client.config.client_side_validation && slug.nil?
1074
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_partial_update"
1075
+ end
1076
+ pattern = Regexp.new(/^[^\/]+$/)
1077
+ if @api_client.config.client_side_validation && slug !~ pattern
1078
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_partial_update, must conform to the pattern #{pattern}."
1079
+ end
1080
+
1081
+ # resource path
1082
+ local_var_path = '/components/{project__slug}/{slug}/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1083
+
1084
+ # query parameters
1085
+ query_params = opts[:query_params] || {}
1086
+
1087
+ # header parameters
1088
+ header_params = opts[:header_params] || {}
1089
+ # HTTP header 'Accept' (if needed)
1090
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1091
+ # HTTP header 'Content-Type'
1092
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
1093
+ if !content_type.nil?
1094
+ header_params['Content-Type'] = content_type
1095
+ end
1096
+
1097
+ # form parameters
1098
+ form_params = opts[:form_params] || {}
1099
+
1100
+ # http body (model)
1101
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_component'])
1102
+
1103
+ # return_type
1104
+ return_type = opts[:debug_return_type] || 'Component'
1105
+
1106
+ # auth_names
1107
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1108
+
1109
+ new_options = opts.merge(
1110
+ :operation => :"ComponentsApi.components_partial_update",
1111
+ :header_params => header_params,
1112
+ :query_params => query_params,
1113
+ :form_params => form_params,
1114
+ :body => post_body,
1115
+ :auth_names => auth_names,
1116
+ :return_type => return_type
1117
+ )
1118
+
1119
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1120
+ if @api_client.config.debugging
1121
+ @api_client.config.logger.debug "API called: ComponentsApi#components_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1122
+ end
1123
+ return data, status_code, headers
1124
+ end
1125
+
1126
+ # Translation components API.
1127
+ # @param project__slug [String]
1128
+ # @param slug [String]
1129
+ # @param repo_request [RepoRequest]
1130
+ # @param [Hash] opts the optional parameters
1131
+ # @return [RepoRequest]
1132
+ def components_repository_create(project__slug, slug, repo_request, opts = {})
1133
+ data, _status_code, _headers = components_repository_create_with_http_info(project__slug, slug, repo_request, opts)
1134
+ data
1135
+ end
1136
+
1137
+ # Translation components API.
1138
+ # @param project__slug [String]
1139
+ # @param slug [String]
1140
+ # @param repo_request [RepoRequest]
1141
+ # @param [Hash] opts the optional parameters
1142
+ # @return [Array<(RepoRequest, Integer, Hash)>] RepoRequest data, response status code and response headers
1143
+ def components_repository_create_with_http_info(project__slug, slug, repo_request, opts = {})
1144
+ if @api_client.config.debugging
1145
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_repository_create ...'
1146
+ end
1147
+ # verify the required parameter 'project__slug' is set
1148
+ if @api_client.config.client_side_validation && project__slug.nil?
1149
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_repository_create"
1150
+ end
1151
+ pattern = Regexp.new(/^[^\/]+$/)
1152
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1153
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_repository_create, must conform to the pattern #{pattern}."
1154
+ end
1155
+
1156
+ # verify the required parameter 'slug' is set
1157
+ if @api_client.config.client_side_validation && slug.nil?
1158
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_repository_create"
1159
+ end
1160
+ pattern = Regexp.new(/^[^\/]+$/)
1161
+ if @api_client.config.client_side_validation && slug !~ pattern
1162
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_repository_create, must conform to the pattern #{pattern}."
1163
+ end
1164
+
1165
+ # verify the required parameter 'repo_request' is set
1166
+ if @api_client.config.client_side_validation && repo_request.nil?
1167
+ fail ArgumentError, "Missing the required parameter 'repo_request' when calling ComponentsApi.components_repository_create"
1168
+ end
1169
+ # resource path
1170
+ local_var_path = '/components/{project__slug}/{slug}/repository/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1171
+
1172
+ # query parameters
1173
+ query_params = opts[:query_params] || {}
1174
+
1175
+ # header parameters
1176
+ header_params = opts[:header_params] || {}
1177
+ # HTTP header 'Accept' (if needed)
1178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1179
+ # HTTP header 'Content-Type'
1180
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
1181
+ if !content_type.nil?
1182
+ header_params['Content-Type'] = content_type
1183
+ end
1184
+
1185
+ # form parameters
1186
+ form_params = opts[:form_params] || {}
1187
+
1188
+ # http body (model)
1189
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(repo_request)
1190
+
1191
+ # return_type
1192
+ return_type = opts[:debug_return_type] || 'RepoRequest'
1193
+
1194
+ # auth_names
1195
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1196
+
1197
+ new_options = opts.merge(
1198
+ :operation => :"ComponentsApi.components_repository_create",
1199
+ :header_params => header_params,
1200
+ :query_params => query_params,
1201
+ :form_params => form_params,
1202
+ :body => post_body,
1203
+ :auth_names => auth_names,
1204
+ :return_type => return_type
1205
+ )
1206
+
1207
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1208
+ if @api_client.config.debugging
1209
+ @api_client.config.logger.debug "API called: ComponentsApi#components_repository_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1210
+ end
1211
+ return data, status_code, headers
1212
+ end
1213
+
1214
+ # Translation components API.
1215
+ # @param project__slug [String]
1216
+ # @param slug [String]
1217
+ # @param [Hash] opts the optional parameters
1218
+ # @return [RepoRequest]
1219
+ def components_repository_retrieve(project__slug, slug, opts = {})
1220
+ data, _status_code, _headers = components_repository_retrieve_with_http_info(project__slug, slug, opts)
1221
+ data
1222
+ end
1223
+
1224
+ # Translation components API.
1225
+ # @param project__slug [String]
1226
+ # @param slug [String]
1227
+ # @param [Hash] opts the optional parameters
1228
+ # @return [Array<(RepoRequest, Integer, Hash)>] RepoRequest data, response status code and response headers
1229
+ def components_repository_retrieve_with_http_info(project__slug, slug, opts = {})
1230
+ if @api_client.config.debugging
1231
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_repository_retrieve ...'
1232
+ end
1233
+ # verify the required parameter 'project__slug' is set
1234
+ if @api_client.config.client_side_validation && project__slug.nil?
1235
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_repository_retrieve"
1236
+ end
1237
+ pattern = Regexp.new(/^[^\/]+$/)
1238
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1239
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_repository_retrieve, must conform to the pattern #{pattern}."
1240
+ end
1241
+
1242
+ # verify the required parameter 'slug' is set
1243
+ if @api_client.config.client_side_validation && slug.nil?
1244
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_repository_retrieve"
1245
+ end
1246
+ pattern = Regexp.new(/^[^\/]+$/)
1247
+ if @api_client.config.client_side_validation && slug !~ pattern
1248
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_repository_retrieve, must conform to the pattern #{pattern}."
1249
+ end
1250
+
1251
+ # resource path
1252
+ local_var_path = '/components/{project__slug}/{slug}/repository/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1253
+
1254
+ # query parameters
1255
+ query_params = opts[:query_params] || {}
1256
+
1257
+ # header parameters
1258
+ header_params = opts[:header_params] || {}
1259
+ # HTTP header 'Accept' (if needed)
1260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1261
+
1262
+ # form parameters
1263
+ form_params = opts[:form_params] || {}
1264
+
1265
+ # http body (model)
1266
+ post_body = opts[:debug_body]
1267
+
1268
+ # return_type
1269
+ return_type = opts[:debug_return_type] || 'RepoRequest'
1270
+
1271
+ # auth_names
1272
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1273
+
1274
+ new_options = opts.merge(
1275
+ :operation => :"ComponentsApi.components_repository_retrieve",
1276
+ :header_params => header_params,
1277
+ :query_params => query_params,
1278
+ :form_params => form_params,
1279
+ :body => post_body,
1280
+ :auth_names => auth_names,
1281
+ :return_type => return_type
1282
+ )
1283
+
1284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1285
+ if @api_client.config.debugging
1286
+ @api_client.config.logger.debug "API called: ComponentsApi#components_repository_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1287
+ end
1288
+ return data, status_code, headers
1289
+ end
1290
+
1291
+ # Translation components API.
1292
+ # @param project__slug [String]
1293
+ # @param slug [String]
1294
+ # @param [Hash] opts the optional parameters
1295
+ # @return [Component]
1296
+ def components_retrieve(project__slug, slug, opts = {})
1297
+ data, _status_code, _headers = components_retrieve_with_http_info(project__slug, slug, opts)
1298
+ data
1299
+ end
1300
+
1301
+ # Translation components API.
1302
+ # @param project__slug [String]
1303
+ # @param slug [String]
1304
+ # @param [Hash] opts the optional parameters
1305
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1306
+ def components_retrieve_with_http_info(project__slug, slug, opts = {})
1307
+ if @api_client.config.debugging
1308
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_retrieve ...'
1309
+ end
1310
+ # verify the required parameter 'project__slug' is set
1311
+ if @api_client.config.client_side_validation && project__slug.nil?
1312
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_retrieve"
1313
+ end
1314
+ pattern = Regexp.new(/^[^\/]+$/)
1315
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1316
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_retrieve, must conform to the pattern #{pattern}."
1317
+ end
1318
+
1319
+ # verify the required parameter 'slug' is set
1320
+ if @api_client.config.client_side_validation && slug.nil?
1321
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_retrieve"
1322
+ end
1323
+ pattern = Regexp.new(/^[^\/]+$/)
1324
+ if @api_client.config.client_side_validation && slug !~ pattern
1325
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_retrieve, must conform to the pattern #{pattern}."
1326
+ end
1327
+
1328
+ # resource path
1329
+ local_var_path = '/components/{project__slug}/{slug}/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1330
+
1331
+ # query parameters
1332
+ query_params = opts[:query_params] || {}
1333
+
1334
+ # header parameters
1335
+ header_params = opts[:header_params] || {}
1336
+ # HTTP header 'Accept' (if needed)
1337
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1338
+
1339
+ # form parameters
1340
+ form_params = opts[:form_params] || {}
1341
+
1342
+ # http body (model)
1343
+ post_body = opts[:debug_body]
1344
+
1345
+ # return_type
1346
+ return_type = opts[:debug_return_type] || 'Component'
1347
+
1348
+ # auth_names
1349
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1350
+
1351
+ new_options = opts.merge(
1352
+ :operation => :"ComponentsApi.components_retrieve",
1353
+ :header_params => header_params,
1354
+ :query_params => query_params,
1355
+ :form_params => form_params,
1356
+ :body => post_body,
1357
+ :auth_names => auth_names,
1358
+ :return_type => return_type
1359
+ )
1360
+
1361
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1362
+ if @api_client.config.debugging
1363
+ @api_client.config.logger.debug "API called: ComponentsApi#components_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1364
+ end
1365
+ return data, status_code, headers
1366
+ end
1367
+
1368
+ # Translation components API.
1369
+ # @param project__slug [String]
1370
+ # @param slug [String]
1371
+ # @param [Hash] opts the optional parameters
1372
+ # @return [Component]
1373
+ def components_screenshots_retrieve(project__slug, slug, opts = {})
1374
+ data, _status_code, _headers = components_screenshots_retrieve_with_http_info(project__slug, slug, opts)
1375
+ data
1376
+ end
1377
+
1378
+ # Translation components API.
1379
+ # @param project__slug [String]
1380
+ # @param slug [String]
1381
+ # @param [Hash] opts the optional parameters
1382
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1383
+ def components_screenshots_retrieve_with_http_info(project__slug, slug, opts = {})
1384
+ if @api_client.config.debugging
1385
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_screenshots_retrieve ...'
1386
+ end
1387
+ # verify the required parameter 'project__slug' is set
1388
+ if @api_client.config.client_side_validation && project__slug.nil?
1389
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_screenshots_retrieve"
1390
+ end
1391
+ pattern = Regexp.new(/^[^\/]+$/)
1392
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1393
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_screenshots_retrieve, must conform to the pattern #{pattern}."
1394
+ end
1395
+
1396
+ # verify the required parameter 'slug' is set
1397
+ if @api_client.config.client_side_validation && slug.nil?
1398
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_screenshots_retrieve"
1399
+ end
1400
+ pattern = Regexp.new(/^[^\/]+$/)
1401
+ if @api_client.config.client_side_validation && slug !~ pattern
1402
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_screenshots_retrieve, must conform to the pattern #{pattern}."
1403
+ end
1404
+
1405
+ # resource path
1406
+ local_var_path = '/components/{project__slug}/{slug}/screenshots/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1407
+
1408
+ # query parameters
1409
+ query_params = opts[:query_params] || {}
1410
+
1411
+ # header parameters
1412
+ header_params = opts[:header_params] || {}
1413
+ # HTTP header 'Accept' (if needed)
1414
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1415
+
1416
+ # form parameters
1417
+ form_params = opts[:form_params] || {}
1418
+
1419
+ # http body (model)
1420
+ post_body = opts[:debug_body]
1421
+
1422
+ # return_type
1423
+ return_type = opts[:debug_return_type] || 'Component'
1424
+
1425
+ # auth_names
1426
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1427
+
1428
+ new_options = opts.merge(
1429
+ :operation => :"ComponentsApi.components_screenshots_retrieve",
1430
+ :header_params => header_params,
1431
+ :query_params => query_params,
1432
+ :form_params => form_params,
1433
+ :body => post_body,
1434
+ :auth_names => auth_names,
1435
+ :return_type => return_type
1436
+ )
1437
+
1438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1439
+ if @api_client.config.debugging
1440
+ @api_client.config.logger.debug "API called: ComponentsApi#components_screenshots_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1441
+ end
1442
+ return data, status_code, headers
1443
+ end
1444
+
1445
+ # Translation components API.
1446
+ # @param project__slug [String]
1447
+ # @param slug [String]
1448
+ # @param [Hash] opts the optional parameters
1449
+ # @return [Component]
1450
+ def components_statistics_retrieve(project__slug, slug, opts = {})
1451
+ data, _status_code, _headers = components_statistics_retrieve_with_http_info(project__slug, slug, opts)
1452
+ data
1453
+ end
1454
+
1455
+ # Translation components API.
1456
+ # @param project__slug [String]
1457
+ # @param slug [String]
1458
+ # @param [Hash] opts the optional parameters
1459
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1460
+ def components_statistics_retrieve_with_http_info(project__slug, slug, opts = {})
1461
+ if @api_client.config.debugging
1462
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_statistics_retrieve ...'
1463
+ end
1464
+ # verify the required parameter 'project__slug' is set
1465
+ if @api_client.config.client_side_validation && project__slug.nil?
1466
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_statistics_retrieve"
1467
+ end
1468
+ pattern = Regexp.new(/^[^\/]+$/)
1469
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1470
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_statistics_retrieve, must conform to the pattern #{pattern}."
1471
+ end
1472
+
1473
+ # verify the required parameter 'slug' is set
1474
+ if @api_client.config.client_side_validation && slug.nil?
1475
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_statistics_retrieve"
1476
+ end
1477
+ pattern = Regexp.new(/^[^\/]+$/)
1478
+ if @api_client.config.client_side_validation && slug !~ pattern
1479
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_statistics_retrieve, must conform to the pattern #{pattern}."
1480
+ end
1481
+
1482
+ # resource path
1483
+ local_var_path = '/components/{project__slug}/{slug}/statistics/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1484
+
1485
+ # query parameters
1486
+ query_params = opts[:query_params] || {}
1487
+
1488
+ # header parameters
1489
+ header_params = opts[:header_params] || {}
1490
+ # HTTP header 'Accept' (if needed)
1491
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1492
+
1493
+ # form parameters
1494
+ form_params = opts[:form_params] || {}
1495
+
1496
+ # http body (model)
1497
+ post_body = opts[:debug_body]
1498
+
1499
+ # return_type
1500
+ return_type = opts[:debug_return_type] || 'Component'
1501
+
1502
+ # auth_names
1503
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1504
+
1505
+ new_options = opts.merge(
1506
+ :operation => :"ComponentsApi.components_statistics_retrieve",
1507
+ :header_params => header_params,
1508
+ :query_params => query_params,
1509
+ :form_params => form_params,
1510
+ :body => post_body,
1511
+ :auth_names => auth_names,
1512
+ :return_type => return_type
1513
+ )
1514
+
1515
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1516
+ if @api_client.config.debugging
1517
+ @api_client.config.logger.debug "API called: ComponentsApi#components_statistics_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1518
+ end
1519
+ return data, status_code, headers
1520
+ end
1521
+
1522
+ # Translation components API.
1523
+ # @param project__slug [String]
1524
+ # @param slug [String]
1525
+ # @param component [Component]
1526
+ # @param [Hash] opts the optional parameters
1527
+ # @return [Component]
1528
+ def components_translations_create(project__slug, slug, component, opts = {})
1529
+ data, _status_code, _headers = components_translations_create_with_http_info(project__slug, slug, component, opts)
1530
+ data
1531
+ end
1532
+
1533
+ # Translation components API.
1534
+ # @param project__slug [String]
1535
+ # @param slug [String]
1536
+ # @param component [Component]
1537
+ # @param [Hash] opts the optional parameters
1538
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1539
+ def components_translations_create_with_http_info(project__slug, slug, component, opts = {})
1540
+ if @api_client.config.debugging
1541
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_translations_create ...'
1542
+ end
1543
+ # verify the required parameter 'project__slug' is set
1544
+ if @api_client.config.client_side_validation && project__slug.nil?
1545
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_translations_create"
1546
+ end
1547
+ pattern = Regexp.new(/^[^\/]+$/)
1548
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1549
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_translations_create, must conform to the pattern #{pattern}."
1550
+ end
1551
+
1552
+ # verify the required parameter 'slug' is set
1553
+ if @api_client.config.client_side_validation && slug.nil?
1554
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_translations_create"
1555
+ end
1556
+ pattern = Regexp.new(/^[^\/]+$/)
1557
+ if @api_client.config.client_side_validation && slug !~ pattern
1558
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_translations_create, must conform to the pattern #{pattern}."
1559
+ end
1560
+
1561
+ # verify the required parameter 'component' is set
1562
+ if @api_client.config.client_side_validation && component.nil?
1563
+ fail ArgumentError, "Missing the required parameter 'component' when calling ComponentsApi.components_translations_create"
1564
+ end
1565
+ # resource path
1566
+ local_var_path = '/components/{project__slug}/{slug}/translations/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1567
+
1568
+ # query parameters
1569
+ query_params = opts[:query_params] || {}
1570
+
1571
+ # header parameters
1572
+ header_params = opts[:header_params] || {}
1573
+ # HTTP header 'Accept' (if needed)
1574
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1575
+ # HTTP header 'Content-Type'
1576
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
1577
+ if !content_type.nil?
1578
+ header_params['Content-Type'] = content_type
1579
+ end
1580
+
1581
+ # form parameters
1582
+ form_params = opts[:form_params] || {}
1583
+
1584
+ # http body (model)
1585
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(component)
1586
+
1587
+ # return_type
1588
+ return_type = opts[:debug_return_type] || 'Component'
1589
+
1590
+ # auth_names
1591
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1592
+
1593
+ new_options = opts.merge(
1594
+ :operation => :"ComponentsApi.components_translations_create",
1595
+ :header_params => header_params,
1596
+ :query_params => query_params,
1597
+ :form_params => form_params,
1598
+ :body => post_body,
1599
+ :auth_names => auth_names,
1600
+ :return_type => return_type
1601
+ )
1602
+
1603
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1604
+ if @api_client.config.debugging
1605
+ @api_client.config.logger.debug "API called: ComponentsApi#components_translations_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1606
+ end
1607
+ return data, status_code, headers
1608
+ end
1609
+
1610
+ # Translation components API.
1611
+ # @param project__slug [String]
1612
+ # @param slug [String]
1613
+ # @param [Hash] opts the optional parameters
1614
+ # @return [Component]
1615
+ def components_translations_retrieve(project__slug, slug, opts = {})
1616
+ data, _status_code, _headers = components_translations_retrieve_with_http_info(project__slug, slug, opts)
1617
+ data
1618
+ end
1619
+
1620
+ # Translation components API.
1621
+ # @param project__slug [String]
1622
+ # @param slug [String]
1623
+ # @param [Hash] opts the optional parameters
1624
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1625
+ def components_translations_retrieve_with_http_info(project__slug, slug, opts = {})
1626
+ if @api_client.config.debugging
1627
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_translations_retrieve ...'
1628
+ end
1629
+ # verify the required parameter 'project__slug' is set
1630
+ if @api_client.config.client_side_validation && project__slug.nil?
1631
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_translations_retrieve"
1632
+ end
1633
+ pattern = Regexp.new(/^[^\/]+$/)
1634
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1635
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_translations_retrieve, must conform to the pattern #{pattern}."
1636
+ end
1637
+
1638
+ # verify the required parameter 'slug' is set
1639
+ if @api_client.config.client_side_validation && slug.nil?
1640
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_translations_retrieve"
1641
+ end
1642
+ pattern = Regexp.new(/^[^\/]+$/)
1643
+ if @api_client.config.client_side_validation && slug !~ pattern
1644
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_translations_retrieve, must conform to the pattern #{pattern}."
1645
+ end
1646
+
1647
+ # resource path
1648
+ local_var_path = '/components/{project__slug}/{slug}/translations/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1649
+
1650
+ # query parameters
1651
+ query_params = opts[:query_params] || {}
1652
+
1653
+ # header parameters
1654
+ header_params = opts[:header_params] || {}
1655
+ # HTTP header 'Accept' (if needed)
1656
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1657
+
1658
+ # form parameters
1659
+ form_params = opts[:form_params] || {}
1660
+
1661
+ # http body (model)
1662
+ post_body = opts[:debug_body]
1663
+
1664
+ # return_type
1665
+ return_type = opts[:debug_return_type] || 'Component'
1666
+
1667
+ # auth_names
1668
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1669
+
1670
+ new_options = opts.merge(
1671
+ :operation => :"ComponentsApi.components_translations_retrieve",
1672
+ :header_params => header_params,
1673
+ :query_params => query_params,
1674
+ :form_params => form_params,
1675
+ :body => post_body,
1676
+ :auth_names => auth_names,
1677
+ :return_type => return_type
1678
+ )
1679
+
1680
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1681
+ if @api_client.config.debugging
1682
+ @api_client.config.logger.debug "API called: ComponentsApi#components_translations_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1683
+ end
1684
+ return data, status_code, headers
1685
+ end
1686
+
1687
+ # Translation components API.
1688
+ # @param project__slug [String]
1689
+ # @param slug [String]
1690
+ # @param component [Component]
1691
+ # @param [Hash] opts the optional parameters
1692
+ # @return [Component]
1693
+ def components_update(project__slug, slug, component, opts = {})
1694
+ data, _status_code, _headers = components_update_with_http_info(project__slug, slug, component, opts)
1695
+ data
1696
+ end
1697
+
1698
+ # Translation components API.
1699
+ # @param project__slug [String]
1700
+ # @param slug [String]
1701
+ # @param component [Component]
1702
+ # @param [Hash] opts the optional parameters
1703
+ # @return [Array<(Component, Integer, Hash)>] Component data, response status code and response headers
1704
+ def components_update_with_http_info(project__slug, slug, component, opts = {})
1705
+ if @api_client.config.debugging
1706
+ @api_client.config.logger.debug 'Calling API: ComponentsApi.components_update ...'
1707
+ end
1708
+ # verify the required parameter 'project__slug' is set
1709
+ if @api_client.config.client_side_validation && project__slug.nil?
1710
+ fail ArgumentError, "Missing the required parameter 'project__slug' when calling ComponentsApi.components_update"
1711
+ end
1712
+ pattern = Regexp.new(/^[^\/]+$/)
1713
+ if @api_client.config.client_side_validation && project__slug !~ pattern
1714
+ fail ArgumentError, "invalid value for 'project__slug' when calling ComponentsApi.components_update, must conform to the pattern #{pattern}."
1715
+ end
1716
+
1717
+ # verify the required parameter 'slug' is set
1718
+ if @api_client.config.client_side_validation && slug.nil?
1719
+ fail ArgumentError, "Missing the required parameter 'slug' when calling ComponentsApi.components_update"
1720
+ end
1721
+ pattern = Regexp.new(/^[^\/]+$/)
1722
+ if @api_client.config.client_side_validation && slug !~ pattern
1723
+ fail ArgumentError, "invalid value for 'slug' when calling ComponentsApi.components_update, must conform to the pattern #{pattern}."
1724
+ end
1725
+
1726
+ # verify the required parameter 'component' is set
1727
+ if @api_client.config.client_side_validation && component.nil?
1728
+ fail ArgumentError, "Missing the required parameter 'component' when calling ComponentsApi.components_update"
1729
+ end
1730
+ # resource path
1731
+ local_var_path = '/components/{project__slug}/{slug}/'.sub('{' + 'project__slug' + '}', CGI.escape(project__slug.to_s)).sub('{' + 'slug' + '}', CGI.escape(slug.to_s))
1732
+
1733
+ # query parameters
1734
+ query_params = opts[:query_params] || {}
1735
+
1736
+ # header parameters
1737
+ header_params = opts[:header_params] || {}
1738
+ # HTTP header 'Accept' (if needed)
1739
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1740
+ # HTTP header 'Content-Type'
1741
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
1742
+ if !content_type.nil?
1743
+ header_params['Content-Type'] = content_type
1744
+ end
1745
+
1746
+ # form parameters
1747
+ form_params = opts[:form_params] || {}
1748
+
1749
+ # http body (model)
1750
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(component)
1751
+
1752
+ # return_type
1753
+ return_type = opts[:debug_return_type] || 'Component'
1754
+
1755
+ # auth_names
1756
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1757
+
1758
+ new_options = opts.merge(
1759
+ :operation => :"ComponentsApi.components_update",
1760
+ :header_params => header_params,
1761
+ :query_params => query_params,
1762
+ :form_params => form_params,
1763
+ :body => post_body,
1764
+ :auth_names => auth_names,
1765
+ :return_type => return_type
1766
+ )
1767
+
1768
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1769
+ if @api_client.config.debugging
1770
+ @api_client.config.logger.debug "API called: ComponentsApi#components_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1771
+ end
1772
+ return data, status_code, headers
1773
+ end
1774
+ end
1775
+ end