kleister 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +18 -0
  3. data/CONTRIBUTING.md +121 -0
  4. data/DCO +34 -0
  5. data/LICENSE +202 -0
  6. data/README.md +67 -0
  7. data/lib/kleister/api/auth_api.rb +331 -0
  8. data/lib/kleister/api/fabric_api.rb +367 -0
  9. data/lib/kleister/api/forge_api.rb +367 -0
  10. data/lib/kleister/api/minecraft_api.rb +367 -0
  11. data/lib/kleister/api/mod_api.rb +1603 -0
  12. data/lib/kleister/api/neoforge_api.rb +367 -0
  13. data/lib/kleister/api/pack_api.rb +1603 -0
  14. data/lib/kleister/api/profile_api.rb +198 -0
  15. data/lib/kleister/api/quilt_api.rb +367 -0
  16. data/lib/kleister/api/team_api.rb +1283 -0
  17. data/lib/kleister/api/user_api.rb +1283 -0
  18. data/lib/kleister/api_client.rb +429 -0
  19. data/lib/kleister/api_error.rb +56 -0
  20. data/lib/kleister/configuration.rb +397 -0
  21. data/lib/kleister/models/auth_login.rb +231 -0
  22. data/lib/kleister/models/auth_token.rb +227 -0
  23. data/lib/kleister/models/auth_verify.rb +227 -0
  24. data/lib/kleister/models/build.rb +365 -0
  25. data/lib/kleister/models/build_version.rb +261 -0
  26. data/lib/kleister/models/build_version_params.rb +233 -0
  27. data/lib/kleister/models/build_versions.rb +235 -0
  28. data/lib/kleister/models/builds.rb +227 -0
  29. data/lib/kleister/models/fabric.rb +235 -0
  30. data/lib/kleister/models/fabric_build_params.rb +233 -0
  31. data/lib/kleister/models/fabric_builds.rb +228 -0
  32. data/lib/kleister/models/fabrics.rb +220 -0
  33. data/lib/kleister/models/forge.rb +243 -0
  34. data/lib/kleister/models/forge_build_params.rb +233 -0
  35. data/lib/kleister/models/forge_builds.rb +227 -0
  36. data/lib/kleister/models/forges.rb +220 -0
  37. data/lib/kleister/models/minecraft.rb +243 -0
  38. data/lib/kleister/models/minecraft_build_params.rb +233 -0
  39. data/lib/kleister/models/minecraft_builds.rb +228 -0
  40. data/lib/kleister/models/minecrafts.rb +220 -0
  41. data/lib/kleister/models/mod.rb +350 -0
  42. data/lib/kleister/models/mod_team_params.rb +265 -0
  43. data/lib/kleister/models/mod_teams.rb +227 -0
  44. data/lib/kleister/models/mod_user_params.rb +265 -0
  45. data/lib/kleister/models/mod_users.rb +227 -0
  46. data/lib/kleister/models/mods.rb +220 -0
  47. data/lib/kleister/models/neoforge.rb +243 -0
  48. data/lib/kleister/models/neoforge_build_params.rb +233 -0
  49. data/lib/kleister/models/neoforge_builds.rb +228 -0
  50. data/lib/kleister/models/neoforges.rb +220 -0
  51. data/lib/kleister/models/notification.rb +228 -0
  52. data/lib/kleister/models/pack.rb +334 -0
  53. data/lib/kleister/models/pack_back.rb +289 -0
  54. data/lib/kleister/models/pack_icon.rb +289 -0
  55. data/lib/kleister/models/pack_logo.rb +289 -0
  56. data/lib/kleister/models/pack_team_params.rb +265 -0
  57. data/lib/kleister/models/pack_teams.rb +227 -0
  58. data/lib/kleister/models/pack_user_params.rb +265 -0
  59. data/lib/kleister/models/pack_users.rb +227 -0
  60. data/lib/kleister/models/packs.rb +220 -0
  61. data/lib/kleister/models/profile.rb +313 -0
  62. data/lib/kleister/models/quilt.rb +235 -0
  63. data/lib/kleister/models/quilt_build_params.rb +233 -0
  64. data/lib/kleister/models/quilt_builds.rb +227 -0
  65. data/lib/kleister/models/quilts.rb +220 -0
  66. data/lib/kleister/models/team.rb +267 -0
  67. data/lib/kleister/models/team_mod.rb +304 -0
  68. data/lib/kleister/models/team_mod_params.rb +265 -0
  69. data/lib/kleister/models/team_mods.rb +227 -0
  70. data/lib/kleister/models/team_pack.rb +304 -0
  71. data/lib/kleister/models/team_pack_params.rb +265 -0
  72. data/lib/kleister/models/team_packs.rb +227 -0
  73. data/lib/kleister/models/team_user_params.rb +265 -0
  74. data/lib/kleister/models/team_users.rb +227 -0
  75. data/lib/kleister/models/teams.rb +220 -0
  76. data/lib/kleister/models/user.rb +315 -0
  77. data/lib/kleister/models/user_auth.rb +234 -0
  78. data/lib/kleister/models/user_mod.rb +304 -0
  79. data/lib/kleister/models/user_mod_params.rb +265 -0
  80. data/lib/kleister/models/user_mods.rb +227 -0
  81. data/lib/kleister/models/user_pack.rb +304 -0
  82. data/lib/kleister/models/user_pack_params.rb +265 -0
  83. data/lib/kleister/models/user_packs.rb +227 -0
  84. data/lib/kleister/models/user_team.rb +304 -0
  85. data/lib/kleister/models/user_team_params.rb +265 -0
  86. data/lib/kleister/models/user_teams.rb +227 -0
  87. data/lib/kleister/models/users.rb +220 -0
  88. data/lib/kleister/models/validation.rb +220 -0
  89. data/lib/kleister/models/version.rb +280 -0
  90. data/lib/kleister/models/version_build_params.rb +233 -0
  91. data/lib/kleister/models/version_builds.rb +235 -0
  92. data/lib/kleister/models/version_file.rb +289 -0
  93. data/lib/kleister/models/versions.rb +227 -0
  94. data/lib/kleister/version.rb +13 -0
  95. data/lib/kleister.rb +121 -0
  96. metadata +180 -0
@@ -0,0 +1,1603 @@
1
+ # Kleister OpenAPI
2
+ #
3
+ # API definition for Kleister, manage mod packs for Minecraft
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0-alpha1
6
+ # Contact: kleister@webhippie.de
7
+ # Generated by: https://openapi-generator.tech
8
+ # Generator version: 7.6.0
9
+ #
10
+
11
+ require 'cgi'
12
+
13
+ module Kleister
14
+ class PackApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+
21
+ # Attach a version to a build
22
+ # @param pack_id [String] A pack identifier or slug
23
+ # @param build_id [String] A build identifier or slug
24
+ # @param build_version_params [BuildVersionParams] The build version data to attach
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Notification]
27
+ def attach_build_to_version(pack_id, build_id, build_version_params, opts = {})
28
+ data, _status_code, _headers = attach_build_to_version_with_http_info(pack_id, build_id, build_version_params, opts)
29
+ data
30
+ end
31
+
32
+ # Attach a version to a build
33
+ # @param pack_id [String] A pack identifier or slug
34
+ # @param build_id [String] A build identifier or slug
35
+ # @param build_version_params [BuildVersionParams] The build version data to attach
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
38
+ def attach_build_to_version_with_http_info(pack_id, build_id, build_version_params, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: PackApi.attach_build_to_version ...'
41
+ end
42
+ # verify the required parameter 'pack_id' is set
43
+ if @api_client.config.client_side_validation && pack_id.nil?
44
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.attach_build_to_version"
45
+ end
46
+ # verify the required parameter 'build_id' is set
47
+ if @api_client.config.client_side_validation && build_id.nil?
48
+ raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.attach_build_to_version"
49
+ end
50
+ # verify the required parameter 'build_version_params' is set
51
+ if @api_client.config.client_side_validation && build_version_params.nil?
52
+ raise ArgumentError, "Missing the required parameter 'build_version_params' when calling PackApi.attach_build_to_version"
53
+ end
54
+
55
+ # resource path
56
+ local_var_path = '/packs/{pack_id}/builds/{build_id}/versions'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s)).sub('{' + 'build_id' + '}', CGI.escape(build_id.to_s))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+ # HTTP header 'Content-Type'
66
+ content_type = @api_client.select_header_content_type(['application/json'])
67
+ unless content_type.nil?
68
+ header_params['Content-Type'] = content_type
69
+ end
70
+
71
+ # form parameters
72
+ form_params = opts[:form_params] || {}
73
+
74
+ # http body (model)
75
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(build_version_params)
76
+
77
+ # return_type
78
+ return_type = opts[:debug_return_type] || 'Notification'
79
+
80
+ # auth_names
81
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
82
+
83
+ new_options = opts.merge(
84
+ operation: :'PackApi.attach_build_to_version',
85
+ header_params: header_params,
86
+ query_params: query_params,
87
+ form_params: form_params,
88
+ body: post_body,
89
+ auth_names: auth_names,
90
+ return_type: return_type
91
+ )
92
+
93
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "API called: PackApi#attach_build_to_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
96
+ end
97
+ [data, status_code, headers]
98
+ end
99
+
100
+ # Attach a team to pack
101
+ # @param pack_id [String] A pack identifier or slug
102
+ # @param pack_team_params [PackTeamParams] The team data to attach
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Notification]
105
+ def attach_pack_to_team(pack_id, pack_team_params, opts = {})
106
+ data, _status_code, _headers = attach_pack_to_team_with_http_info(pack_id, pack_team_params, opts)
107
+ data
108
+ end
109
+
110
+ # Attach a team to pack
111
+ # @param pack_id [String] A pack identifier or slug
112
+ # @param pack_team_params [PackTeamParams] The team data to attach
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
115
+ def attach_pack_to_team_with_http_info(pack_id, pack_team_params, opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: PackApi.attach_pack_to_team ...'
118
+ end
119
+ # verify the required parameter 'pack_id' is set
120
+ if @api_client.config.client_side_validation && pack_id.nil?
121
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.attach_pack_to_team"
122
+ end
123
+ # verify the required parameter 'pack_team_params' is set
124
+ if @api_client.config.client_side_validation && pack_team_params.nil?
125
+ raise ArgumentError, "Missing the required parameter 'pack_team_params' when calling PackApi.attach_pack_to_team"
126
+ end
127
+
128
+ # resource path
129
+ local_var_path = '/packs/{pack_id}/teams'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+
134
+ # header parameters
135
+ header_params = opts[:header_params] || {}
136
+ # HTTP header 'Accept' (if needed)
137
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
138
+ # HTTP header 'Content-Type'
139
+ content_type = @api_client.select_header_content_type(['application/json'])
140
+ unless content_type.nil?
141
+ header_params['Content-Type'] = content_type
142
+ end
143
+
144
+ # form parameters
145
+ form_params = opts[:form_params] || {}
146
+
147
+ # http body (model)
148
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack_team_params)
149
+
150
+ # return_type
151
+ return_type = opts[:debug_return_type] || 'Notification'
152
+
153
+ # auth_names
154
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
155
+
156
+ new_options = opts.merge(
157
+ operation: :'PackApi.attach_pack_to_team',
158
+ header_params: header_params,
159
+ query_params: query_params,
160
+ form_params: form_params,
161
+ body: post_body,
162
+ auth_names: auth_names,
163
+ return_type: return_type
164
+ )
165
+
166
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: PackApi#attach_pack_to_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ [data, status_code, headers]
171
+ end
172
+
173
+ # Attach a user to pack
174
+ # @param pack_id [String] A pack identifier or slug
175
+ # @param pack_user_params [PackUserParams] The user data to attach
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [Notification]
178
+ def attach_pack_to_user(pack_id, pack_user_params, opts = {})
179
+ data, _status_code, _headers = attach_pack_to_user_with_http_info(pack_id, pack_user_params, opts)
180
+ data
181
+ end
182
+
183
+ # Attach a user to pack
184
+ # @param pack_id [String] A pack identifier or slug
185
+ # @param pack_user_params [PackUserParams] The user data to attach
186
+ # @param [Hash] opts the optional parameters
187
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
188
+ def attach_pack_to_user_with_http_info(pack_id, pack_user_params, opts = {})
189
+ if @api_client.config.debugging
190
+ @api_client.config.logger.debug 'Calling API: PackApi.attach_pack_to_user ...'
191
+ end
192
+ # verify the required parameter 'pack_id' is set
193
+ if @api_client.config.client_side_validation && pack_id.nil?
194
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.attach_pack_to_user"
195
+ end
196
+ # verify the required parameter 'pack_user_params' is set
197
+ if @api_client.config.client_side_validation && pack_user_params.nil?
198
+ raise ArgumentError, "Missing the required parameter 'pack_user_params' when calling PackApi.attach_pack_to_user"
199
+ end
200
+
201
+ # resource path
202
+ local_var_path = '/packs/{pack_id}/users'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
203
+
204
+ # query parameters
205
+ query_params = opts[:query_params] || {}
206
+
207
+ # header parameters
208
+ header_params = opts[:header_params] || {}
209
+ # HTTP header 'Accept' (if needed)
210
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
211
+ # HTTP header 'Content-Type'
212
+ content_type = @api_client.select_header_content_type(['application/json'])
213
+ unless content_type.nil?
214
+ header_params['Content-Type'] = content_type
215
+ end
216
+
217
+ # form parameters
218
+ form_params = opts[:form_params] || {}
219
+
220
+ # http body (model)
221
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack_user_params)
222
+
223
+ # return_type
224
+ return_type = opts[:debug_return_type] || 'Notification'
225
+
226
+ # auth_names
227
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
228
+
229
+ new_options = opts.merge(
230
+ operation: :'PackApi.attach_pack_to_user',
231
+ header_params: header_params,
232
+ query_params: query_params,
233
+ form_params: form_params,
234
+ body: post_body,
235
+ auth_names: auth_names,
236
+ return_type: return_type
237
+ )
238
+
239
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug "API called: PackApi#attach_pack_to_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
+ end
243
+ [data, status_code, headers]
244
+ end
245
+
246
+ # Create a new build for a pack
247
+ # @param pack_id [String] A pack identifier or slug
248
+ # @param build [Build] The build data to create
249
+ # @param [Hash] opts the optional parameters
250
+ # @return [Build]
251
+ def create_build(pack_id, build, opts = {})
252
+ data, _status_code, _headers = create_build_with_http_info(pack_id, build, opts)
253
+ data
254
+ end
255
+
256
+ # Create a new build for a pack
257
+ # @param pack_id [String] A pack identifier or slug
258
+ # @param build [Build] The build data to create
259
+ # @param [Hash] opts the optional parameters
260
+ # @return [Array<(Build, Integer, Hash)>] Build data, response status code and response headers
261
+ def create_build_with_http_info(pack_id, build, opts = {})
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug 'Calling API: PackApi.create_build ...'
264
+ end
265
+ # verify the required parameter 'pack_id' is set
266
+ if @api_client.config.client_side_validation && pack_id.nil?
267
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.create_build"
268
+ end
269
+ # verify the required parameter 'build' is set
270
+ if @api_client.config.client_side_validation && build.nil?
271
+ raise ArgumentError, "Missing the required parameter 'build' when calling PackApi.create_build"
272
+ end
273
+
274
+ # resource path
275
+ local_var_path = '/packs/{pack_id}/builds'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
276
+
277
+ # query parameters
278
+ query_params = opts[:query_params] || {}
279
+
280
+ # header parameters
281
+ header_params = opts[:header_params] || {}
282
+ # HTTP header 'Accept' (if needed)
283
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
284
+ # HTTP header 'Content-Type'
285
+ content_type = @api_client.select_header_content_type(['application/json'])
286
+ unless content_type.nil?
287
+ header_params['Content-Type'] = content_type
288
+ end
289
+
290
+ # form parameters
291
+ form_params = opts[:form_params] || {}
292
+
293
+ # http body (model)
294
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(build)
295
+
296
+ # return_type
297
+ return_type = opts[:debug_return_type] || 'Build'
298
+
299
+ # auth_names
300
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
301
+
302
+ new_options = opts.merge(
303
+ operation: :'PackApi.create_build',
304
+ header_params: header_params,
305
+ query_params: query_params,
306
+ form_params: form_params,
307
+ body: post_body,
308
+ auth_names: auth_names,
309
+ return_type: return_type
310
+ )
311
+
312
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug "API called: PackApi#create_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
315
+ end
316
+ [data, status_code, headers]
317
+ end
318
+
319
+ # Create a new pack
320
+ # @param pack [Pack] The pack data to create
321
+ # @param [Hash] opts the optional parameters
322
+ # @return [Pack]
323
+ def create_pack(pack, opts = {})
324
+ data, _status_code, _headers = create_pack_with_http_info(pack, opts)
325
+ data
326
+ end
327
+
328
+ # Create a new pack
329
+ # @param pack [Pack] The pack data to create
330
+ # @param [Hash] opts the optional parameters
331
+ # @return [Array<(Pack, Integer, Hash)>] Pack data, response status code and response headers
332
+ def create_pack_with_http_info(pack, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug 'Calling API: PackApi.create_pack ...'
335
+ end
336
+ # verify the required parameter 'pack' is set
337
+ if @api_client.config.client_side_validation && pack.nil?
338
+ raise ArgumentError, "Missing the required parameter 'pack' when calling PackApi.create_pack"
339
+ end
340
+
341
+ # resource path
342
+ local_var_path = '/packs'
343
+
344
+ # query parameters
345
+ query_params = opts[:query_params] || {}
346
+
347
+ # header parameters
348
+ header_params = opts[:header_params] || {}
349
+ # HTTP header 'Accept' (if needed)
350
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
351
+ # HTTP header 'Content-Type'
352
+ content_type = @api_client.select_header_content_type(['application/json'])
353
+ unless content_type.nil?
354
+ header_params['Content-Type'] = content_type
355
+ end
356
+
357
+ # form parameters
358
+ form_params = opts[:form_params] || {}
359
+
360
+ # http body (model)
361
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack)
362
+
363
+ # return_type
364
+ return_type = opts[:debug_return_type] || 'Pack'
365
+
366
+ # auth_names
367
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
368
+
369
+ new_options = opts.merge(
370
+ operation: :'PackApi.create_pack',
371
+ header_params: header_params,
372
+ query_params: query_params,
373
+ form_params: form_params,
374
+ body: post_body,
375
+ auth_names: auth_names,
376
+ return_type: return_type
377
+ )
378
+
379
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug "API called: PackApi#create_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
+ end
383
+ [data, status_code, headers]
384
+ end
385
+
386
+ # Delete a specific build for a pack
387
+ # @param pack_id [String] A pack identifier or slug
388
+ # @param build_id [String] A build identifier or slug
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [Notification]
391
+ def delete_build(pack_id, build_id, opts = {})
392
+ data, _status_code, _headers = delete_build_with_http_info(pack_id, build_id, opts)
393
+ data
394
+ end
395
+
396
+ # Delete a specific build for a pack
397
+ # @param pack_id [String] A pack identifier or slug
398
+ # @param build_id [String] A build identifier or slug
399
+ # @param [Hash] opts the optional parameters
400
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
401
+ def delete_build_with_http_info(pack_id, build_id, opts = {})
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug 'Calling API: PackApi.delete_build ...'
404
+ end
405
+ # verify the required parameter 'pack_id' is set
406
+ if @api_client.config.client_side_validation && pack_id.nil?
407
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.delete_build"
408
+ end
409
+ # verify the required parameter 'build_id' is set
410
+ if @api_client.config.client_side_validation && build_id.nil?
411
+ raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.delete_build"
412
+ end
413
+
414
+ # resource path
415
+ local_var_path = '/packs/{pack_id}/builds/{build_id}'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s)).sub('{' + 'build_id' + '}', CGI.escape(build_id.to_s))
416
+
417
+ # query parameters
418
+ query_params = opts[:query_params] || {}
419
+
420
+ # header parameters
421
+ header_params = opts[:header_params] || {}
422
+ # HTTP header 'Accept' (if needed)
423
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
424
+
425
+ # form parameters
426
+ form_params = opts[:form_params] || {}
427
+
428
+ # http body (model)
429
+ post_body = opts[:debug_body]
430
+
431
+ # return_type
432
+ return_type = opts[:debug_return_type] || 'Notification'
433
+
434
+ # auth_names
435
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
436
+
437
+ new_options = opts.merge(
438
+ operation: :'PackApi.delete_build',
439
+ header_params: header_params,
440
+ query_params: query_params,
441
+ form_params: form_params,
442
+ body: post_body,
443
+ auth_names: auth_names,
444
+ return_type: return_type
445
+ )
446
+
447
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug "API called: PackApi#delete_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
450
+ end
451
+ [data, status_code, headers]
452
+ end
453
+
454
+ # Unlink a version from a build
455
+ # @param pack_id [String] A pack identifier or slug
456
+ # @param build_id [String] A build identifier or slug
457
+ # @param build_version_params [BuildVersionParams] The build version data to unlink
458
+ # @param [Hash] opts the optional parameters
459
+ # @return [Notification]
460
+ def delete_build_from_version(pack_id, build_id, build_version_params, opts = {})
461
+ data, _status_code, _headers = delete_build_from_version_with_http_info(pack_id, build_id, build_version_params, opts)
462
+ data
463
+ end
464
+
465
+ # Unlink a version from a build
466
+ # @param pack_id [String] A pack identifier or slug
467
+ # @param build_id [String] A build identifier or slug
468
+ # @param build_version_params [BuildVersionParams] The build version data to unlink
469
+ # @param [Hash] opts the optional parameters
470
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
471
+ def delete_build_from_version_with_http_info(pack_id, build_id, build_version_params, opts = {})
472
+ if @api_client.config.debugging
473
+ @api_client.config.logger.debug 'Calling API: PackApi.delete_build_from_version ...'
474
+ end
475
+ # verify the required parameter 'pack_id' is set
476
+ if @api_client.config.client_side_validation && pack_id.nil?
477
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.delete_build_from_version"
478
+ end
479
+ # verify the required parameter 'build_id' is set
480
+ if @api_client.config.client_side_validation && build_id.nil?
481
+ raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.delete_build_from_version"
482
+ end
483
+ # verify the required parameter 'build_version_params' is set
484
+ if @api_client.config.client_side_validation && build_version_params.nil?
485
+ raise ArgumentError, "Missing the required parameter 'build_version_params' when calling PackApi.delete_build_from_version"
486
+ end
487
+
488
+ # resource path
489
+ local_var_path = '/packs/{pack_id}/builds/{build_id}/versions'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s)).sub('{' + 'build_id' + '}', CGI.escape(build_id.to_s))
490
+
491
+ # query parameters
492
+ query_params = opts[:query_params] || {}
493
+
494
+ # header parameters
495
+ header_params = opts[:header_params] || {}
496
+ # HTTP header 'Accept' (if needed)
497
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
498
+ # HTTP header 'Content-Type'
499
+ content_type = @api_client.select_header_content_type(['application/json'])
500
+ unless content_type.nil?
501
+ header_params['Content-Type'] = content_type
502
+ end
503
+
504
+ # form parameters
505
+ form_params = opts[:form_params] || {}
506
+
507
+ # http body (model)
508
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(build_version_params)
509
+
510
+ # return_type
511
+ return_type = opts[:debug_return_type] || 'Notification'
512
+
513
+ # auth_names
514
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
515
+
516
+ new_options = opts.merge(
517
+ operation: :'PackApi.delete_build_from_version',
518
+ header_params: header_params,
519
+ query_params: query_params,
520
+ form_params: form_params,
521
+ body: post_body,
522
+ auth_names: auth_names,
523
+ return_type: return_type
524
+ )
525
+
526
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
527
+ if @api_client.config.debugging
528
+ @api_client.config.logger.debug "API called: PackApi#delete_build_from_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
529
+ end
530
+ [data, status_code, headers]
531
+ end
532
+
533
+ # Delete a specific pack
534
+ # @param pack_id [String] A pack identifier or slug
535
+ # @param [Hash] opts the optional parameters
536
+ # @return [Notification]
537
+ def delete_pack(pack_id, opts = {})
538
+ data, _status_code, _headers = delete_pack_with_http_info(pack_id, opts)
539
+ data
540
+ end
541
+
542
+ # Delete a specific pack
543
+ # @param pack_id [String] A pack identifier or slug
544
+ # @param [Hash] opts the optional parameters
545
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
546
+ def delete_pack_with_http_info(pack_id, opts = {})
547
+ if @api_client.config.debugging
548
+ @api_client.config.logger.debug 'Calling API: PackApi.delete_pack ...'
549
+ end
550
+ # verify the required parameter 'pack_id' is set
551
+ if @api_client.config.client_side_validation && pack_id.nil?
552
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.delete_pack"
553
+ end
554
+
555
+ # resource path
556
+ local_var_path = '/packs/{pack_id}'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
557
+
558
+ # query parameters
559
+ query_params = opts[:query_params] || {}
560
+
561
+ # header parameters
562
+ header_params = opts[:header_params] || {}
563
+ # HTTP header 'Accept' (if needed)
564
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
565
+
566
+ # form parameters
567
+ form_params = opts[:form_params] || {}
568
+
569
+ # http body (model)
570
+ post_body = opts[:debug_body]
571
+
572
+ # return_type
573
+ return_type = opts[:debug_return_type] || 'Notification'
574
+
575
+ # auth_names
576
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
577
+
578
+ new_options = opts.merge(
579
+ operation: :'PackApi.delete_pack',
580
+ header_params: header_params,
581
+ query_params: query_params,
582
+ form_params: form_params,
583
+ body: post_body,
584
+ auth_names: auth_names,
585
+ return_type: return_type
586
+ )
587
+
588
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
589
+ if @api_client.config.debugging
590
+ @api_client.config.logger.debug "API called: PackApi#delete_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
591
+ end
592
+ [data, status_code, headers]
593
+ end
594
+
595
+ # Unlink a team from pack
596
+ # @param pack_id [String] A pack identifier or slug
597
+ # @param pack_team_params [PackTeamParams] The pack team data to unlink
598
+ # @param [Hash] opts the optional parameters
599
+ # @return [Notification]
600
+ def delete_pack_from_team(pack_id, pack_team_params, opts = {})
601
+ data, _status_code, _headers = delete_pack_from_team_with_http_info(pack_id, pack_team_params, opts)
602
+ data
603
+ end
604
+
605
+ # Unlink a team from pack
606
+ # @param pack_id [String] A pack identifier or slug
607
+ # @param pack_team_params [PackTeamParams] The pack team data to unlink
608
+ # @param [Hash] opts the optional parameters
609
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
610
+ def delete_pack_from_team_with_http_info(pack_id, pack_team_params, opts = {})
611
+ if @api_client.config.debugging
612
+ @api_client.config.logger.debug 'Calling API: PackApi.delete_pack_from_team ...'
613
+ end
614
+ # verify the required parameter 'pack_id' is set
615
+ if @api_client.config.client_side_validation && pack_id.nil?
616
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.delete_pack_from_team"
617
+ end
618
+ # verify the required parameter 'pack_team_params' is set
619
+ if @api_client.config.client_side_validation && pack_team_params.nil?
620
+ raise ArgumentError, "Missing the required parameter 'pack_team_params' when calling PackApi.delete_pack_from_team"
621
+ end
622
+
623
+ # resource path
624
+ local_var_path = '/packs/{pack_id}/teams'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
625
+
626
+ # query parameters
627
+ query_params = opts[:query_params] || {}
628
+
629
+ # header parameters
630
+ header_params = opts[:header_params] || {}
631
+ # HTTP header 'Accept' (if needed)
632
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
633
+ # HTTP header 'Content-Type'
634
+ content_type = @api_client.select_header_content_type(['application/json'])
635
+ unless content_type.nil?
636
+ header_params['Content-Type'] = content_type
637
+ end
638
+
639
+ # form parameters
640
+ form_params = opts[:form_params] || {}
641
+
642
+ # http body (model)
643
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack_team_params)
644
+
645
+ # return_type
646
+ return_type = opts[:debug_return_type] || 'Notification'
647
+
648
+ # auth_names
649
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
650
+
651
+ new_options = opts.merge(
652
+ operation: :'PackApi.delete_pack_from_team',
653
+ header_params: header_params,
654
+ query_params: query_params,
655
+ form_params: form_params,
656
+ body: post_body,
657
+ auth_names: auth_names,
658
+ return_type: return_type
659
+ )
660
+
661
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
662
+ if @api_client.config.debugging
663
+ @api_client.config.logger.debug "API called: PackApi#delete_pack_from_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
664
+ end
665
+ [data, status_code, headers]
666
+ end
667
+
668
+ # Unlink a user from pack
669
+ # @param pack_id [String] A pack identifier or slug
670
+ # @param pack_user_params [PackUserParams] The pack user data to unlink
671
+ # @param [Hash] opts the optional parameters
672
+ # @return [Notification]
673
+ def delete_pack_from_user(pack_id, pack_user_params, opts = {})
674
+ data, _status_code, _headers = delete_pack_from_user_with_http_info(pack_id, pack_user_params, opts)
675
+ data
676
+ end
677
+
678
+ # Unlink a user from pack
679
+ # @param pack_id [String] A pack identifier or slug
680
+ # @param pack_user_params [PackUserParams] The pack user data to unlink
681
+ # @param [Hash] opts the optional parameters
682
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
683
+ def delete_pack_from_user_with_http_info(pack_id, pack_user_params, opts = {})
684
+ if @api_client.config.debugging
685
+ @api_client.config.logger.debug 'Calling API: PackApi.delete_pack_from_user ...'
686
+ end
687
+ # verify the required parameter 'pack_id' is set
688
+ if @api_client.config.client_side_validation && pack_id.nil?
689
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.delete_pack_from_user"
690
+ end
691
+ # verify the required parameter 'pack_user_params' is set
692
+ if @api_client.config.client_side_validation && pack_user_params.nil?
693
+ raise ArgumentError, "Missing the required parameter 'pack_user_params' when calling PackApi.delete_pack_from_user"
694
+ end
695
+
696
+ # resource path
697
+ local_var_path = '/packs/{pack_id}/users'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
698
+
699
+ # query parameters
700
+ query_params = opts[:query_params] || {}
701
+
702
+ # header parameters
703
+ header_params = opts[:header_params] || {}
704
+ # HTTP header 'Accept' (if needed)
705
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
706
+ # HTTP header 'Content-Type'
707
+ content_type = @api_client.select_header_content_type(['application/json'])
708
+ unless content_type.nil?
709
+ header_params['Content-Type'] = content_type
710
+ end
711
+
712
+ # form parameters
713
+ form_params = opts[:form_params] || {}
714
+
715
+ # http body (model)
716
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack_user_params)
717
+
718
+ # return_type
719
+ return_type = opts[:debug_return_type] || 'Notification'
720
+
721
+ # auth_names
722
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
723
+
724
+ new_options = opts.merge(
725
+ operation: :'PackApi.delete_pack_from_user',
726
+ header_params: header_params,
727
+ query_params: query_params,
728
+ form_params: form_params,
729
+ body: post_body,
730
+ auth_names: auth_names,
731
+ return_type: return_type
732
+ )
733
+
734
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
735
+ if @api_client.config.debugging
736
+ @api_client.config.logger.debug "API called: PackApi#delete_pack_from_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
737
+ end
738
+ [data, status_code, headers]
739
+ end
740
+
741
+ # Fetch all versions attached to build
742
+ # @param pack_id [String] A pack identifier or slug
743
+ # @param build_id [String] A build identifier or slug
744
+ # @param [Hash] opts the optional parameters
745
+ # @option opts [String] :search Search query
746
+ # @option opts [String] :sort Sorting column (default to 'name')
747
+ # @option opts [String] :order Sorting order (default to 'asc')
748
+ # @option opts [Integer] :limit Paging limit
749
+ # @option opts [Integer] :offset Paging offset
750
+ # @return [UserTeams]
751
+ def list_build_versions(pack_id, build_id, opts = {})
752
+ data, _status_code, _headers = list_build_versions_with_http_info(pack_id, build_id, opts)
753
+ data
754
+ end
755
+
756
+ # Fetch all versions attached to build
757
+ # @param pack_id [String] A pack identifier or slug
758
+ # @param build_id [String] A build identifier or slug
759
+ # @param [Hash] opts the optional parameters
760
+ # @option opts [String] :search Search query
761
+ # @option opts [String] :sort Sorting column (default to 'name')
762
+ # @option opts [String] :order Sorting order (default to 'asc')
763
+ # @option opts [Integer] :limit Paging limit
764
+ # @option opts [Integer] :offset Paging offset
765
+ # @return [Array<(UserTeams, Integer, Hash)>] UserTeams data, response status code and response headers
766
+ def list_build_versions_with_http_info(pack_id, build_id, opts = {})
767
+ if @api_client.config.debugging
768
+ @api_client.config.logger.debug 'Calling API: PackApi.list_build_versions ...'
769
+ end
770
+ # verify the required parameter 'pack_id' is set
771
+ if @api_client.config.client_side_validation && pack_id.nil?
772
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.list_build_versions"
773
+ end
774
+ # verify the required parameter 'build_id' is set
775
+ if @api_client.config.client_side_validation && build_id.nil?
776
+ raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.list_build_versions"
777
+ end
778
+
779
+ allowable_values = %w[slug name]
780
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
781
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
782
+ end
783
+
784
+ allowable_values = %w[asc desc]
785
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
786
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
787
+ end
788
+
789
+ # resource path
790
+ local_var_path = '/packs/{pack_id}/builds/{build_id}/versions'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s)).sub('{' + 'build_id' + '}', CGI.escape(build_id.to_s))
791
+
792
+ # query parameters
793
+ query_params = opts[:query_params] || {}
794
+ query_params[:search] = opts[:search] unless opts[:search].nil?
795
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
796
+ query_params[:order] = opts[:order] unless opts[:order].nil?
797
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
798
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
799
+
800
+ # header parameters
801
+ header_params = opts[:header_params] || {}
802
+ # HTTP header 'Accept' (if needed)
803
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
804
+
805
+ # form parameters
806
+ form_params = opts[:form_params] || {}
807
+
808
+ # http body (model)
809
+ post_body = opts[:debug_body]
810
+
811
+ # return_type
812
+ return_type = opts[:debug_return_type] || 'UserTeams'
813
+
814
+ # auth_names
815
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
816
+
817
+ new_options = opts.merge(
818
+ operation: :'PackApi.list_build_versions',
819
+ header_params: header_params,
820
+ query_params: query_params,
821
+ form_params: form_params,
822
+ body: post_body,
823
+ auth_names: auth_names,
824
+ return_type: return_type
825
+ )
826
+
827
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
828
+ if @api_client.config.debugging
829
+ @api_client.config.logger.debug "API called: PackApi#list_build_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
830
+ end
831
+ [data, status_code, headers]
832
+ end
833
+
834
+ # Fetch all available builds for a pack
835
+ # @param pack_id [String] A pack identifier or slug
836
+ # @param [Hash] opts the optional parameters
837
+ # @option opts [String] :search Search query
838
+ # @option opts [String] :sort Sorting column (default to 'name')
839
+ # @option opts [String] :order Sorting order (default to 'asc')
840
+ # @option opts [Integer] :limit Paging limit
841
+ # @option opts [Integer] :offset Paging offset
842
+ # @return [Builds]
843
+ def list_builds(pack_id, opts = {})
844
+ data, _status_code, _headers = list_builds_with_http_info(pack_id, opts)
845
+ data
846
+ end
847
+
848
+ # Fetch all available builds for a pack
849
+ # @param pack_id [String] A pack identifier or slug
850
+ # @param [Hash] opts the optional parameters
851
+ # @option opts [String] :search Search query
852
+ # @option opts [String] :sort Sorting column (default to 'name')
853
+ # @option opts [String] :order Sorting order (default to 'asc')
854
+ # @option opts [Integer] :limit Paging limit
855
+ # @option opts [Integer] :offset Paging offset
856
+ # @return [Array<(Builds, Integer, Hash)>] Builds data, response status code and response headers
857
+ def list_builds_with_http_info(pack_id, opts = {})
858
+ if @api_client.config.debugging
859
+ @api_client.config.logger.debug 'Calling API: PackApi.list_builds ...'
860
+ end
861
+ # verify the required parameter 'pack_id' is set
862
+ if @api_client.config.client_side_validation && pack_id.nil?
863
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.list_builds"
864
+ end
865
+
866
+ allowable_values = %w[slug name]
867
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
868
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
869
+ end
870
+
871
+ allowable_values = %w[asc desc]
872
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
873
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
874
+ end
875
+
876
+ # resource path
877
+ local_var_path = '/packs/{pack_id}/builds'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
878
+
879
+ # query parameters
880
+ query_params = opts[:query_params] || {}
881
+ query_params[:search] = opts[:search] unless opts[:search].nil?
882
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
883
+ query_params[:order] = opts[:order] unless opts[:order].nil?
884
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
885
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
886
+
887
+ # header parameters
888
+ header_params = opts[:header_params] || {}
889
+ # HTTP header 'Accept' (if needed)
890
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
891
+
892
+ # form parameters
893
+ form_params = opts[:form_params] || {}
894
+
895
+ # http body (model)
896
+ post_body = opts[:debug_body]
897
+
898
+ # return_type
899
+ return_type = opts[:debug_return_type] || 'Builds'
900
+
901
+ # auth_names
902
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
903
+
904
+ new_options = opts.merge(
905
+ operation: :'PackApi.list_builds',
906
+ header_params: header_params,
907
+ query_params: query_params,
908
+ form_params: form_params,
909
+ body: post_body,
910
+ auth_names: auth_names,
911
+ return_type: return_type
912
+ )
913
+
914
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
915
+ if @api_client.config.debugging
916
+ @api_client.config.logger.debug "API called: PackApi#list_builds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
917
+ end
918
+ [data, status_code, headers]
919
+ end
920
+
921
+ # Fetch all teams attached to pack
922
+ # @param pack_id [String] A pack identifier or slug
923
+ # @param [Hash] opts the optional parameters
924
+ # @option opts [String] :search Search query
925
+ # @option opts [String] :sort Sorting column (default to 'name')
926
+ # @option opts [String] :order Sorting order (default to 'asc')
927
+ # @option opts [Integer] :limit Paging limit (default to 100)
928
+ # @option opts [Integer] :offset Paging offset (default to 0)
929
+ # @return [PackTeams]
930
+ def list_pack_teams(pack_id, opts = {})
931
+ data, _status_code, _headers = list_pack_teams_with_http_info(pack_id, opts)
932
+ data
933
+ end
934
+
935
+ # Fetch all teams attached to pack
936
+ # @param pack_id [String] A pack identifier or slug
937
+ # @param [Hash] opts the optional parameters
938
+ # @option opts [String] :search Search query
939
+ # @option opts [String] :sort Sorting column (default to 'name')
940
+ # @option opts [String] :order Sorting order (default to 'asc')
941
+ # @option opts [Integer] :limit Paging limit (default to 100)
942
+ # @option opts [Integer] :offset Paging offset (default to 0)
943
+ # @return [Array<(PackTeams, Integer, Hash)>] PackTeams data, response status code and response headers
944
+ def list_pack_teams_with_http_info(pack_id, opts = {})
945
+ if @api_client.config.debugging
946
+ @api_client.config.logger.debug 'Calling API: PackApi.list_pack_teams ...'
947
+ end
948
+ # verify the required parameter 'pack_id' is set
949
+ if @api_client.config.client_side_validation && pack_id.nil?
950
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.list_pack_teams"
951
+ end
952
+
953
+ allowable_values = %w[slug name]
954
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
955
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
956
+ end
957
+
958
+ allowable_values = %w[asc desc]
959
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
960
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
961
+ end
962
+
963
+ # resource path
964
+ local_var_path = '/packs/{pack_id}/teams'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
965
+
966
+ # query parameters
967
+ query_params = opts[:query_params] || {}
968
+ query_params[:search] = opts[:search] unless opts[:search].nil?
969
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
970
+ query_params[:order] = opts[:order] unless opts[:order].nil?
971
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
972
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
973
+
974
+ # header parameters
975
+ header_params = opts[:header_params] || {}
976
+ # HTTP header 'Accept' (if needed)
977
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
978
+
979
+ # form parameters
980
+ form_params = opts[:form_params] || {}
981
+
982
+ # http body (model)
983
+ post_body = opts[:debug_body]
984
+
985
+ # return_type
986
+ return_type = opts[:debug_return_type] || 'PackTeams'
987
+
988
+ # auth_names
989
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
990
+
991
+ new_options = opts.merge(
992
+ operation: :'PackApi.list_pack_teams',
993
+ header_params: header_params,
994
+ query_params: query_params,
995
+ form_params: form_params,
996
+ body: post_body,
997
+ auth_names: auth_names,
998
+ return_type: return_type
999
+ )
1000
+
1001
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1002
+ if @api_client.config.debugging
1003
+ @api_client.config.logger.debug "API called: PackApi#list_pack_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1004
+ end
1005
+ [data, status_code, headers]
1006
+ end
1007
+
1008
+ # Fetch all users attached to pack
1009
+ # @param pack_id [String] A pack identifier or slug
1010
+ # @param [Hash] opts the optional parameters
1011
+ # @option opts [String] :search Search query
1012
+ # @option opts [String] :sort Sorting column (default to 'username')
1013
+ # @option opts [String] :order Sorting order (default to 'asc')
1014
+ # @option opts [Integer] :limit Paging limit (default to 100)
1015
+ # @option opts [Integer] :offset Paging offset (default to 0)
1016
+ # @return [PackUsers]
1017
+ def list_pack_users(pack_id, opts = {})
1018
+ data, _status_code, _headers = list_pack_users_with_http_info(pack_id, opts)
1019
+ data
1020
+ end
1021
+
1022
+ # Fetch all users attached to pack
1023
+ # @param pack_id [String] A pack identifier or slug
1024
+ # @param [Hash] opts the optional parameters
1025
+ # @option opts [String] :search Search query
1026
+ # @option opts [String] :sort Sorting column (default to 'username')
1027
+ # @option opts [String] :order Sorting order (default to 'asc')
1028
+ # @option opts [Integer] :limit Paging limit (default to 100)
1029
+ # @option opts [Integer] :offset Paging offset (default to 0)
1030
+ # @return [Array<(PackUsers, Integer, Hash)>] PackUsers data, response status code and response headers
1031
+ def list_pack_users_with_http_info(pack_id, opts = {})
1032
+ if @api_client.config.debugging
1033
+ @api_client.config.logger.debug 'Calling API: PackApi.list_pack_users ...'
1034
+ end
1035
+ # verify the required parameter 'pack_id' is set
1036
+ if @api_client.config.client_side_validation && pack_id.nil?
1037
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.list_pack_users"
1038
+ end
1039
+
1040
+ allowable_values = %w[username email fullname admin active]
1041
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
1042
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1043
+ end
1044
+
1045
+ allowable_values = %w[asc desc]
1046
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
1047
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
1048
+ end
1049
+
1050
+ # resource path
1051
+ local_var_path = '/packs/{pack_id}/users'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
1052
+
1053
+ # query parameters
1054
+ query_params = opts[:query_params] || {}
1055
+ query_params[:search] = opts[:search] unless opts[:search].nil?
1056
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
1057
+ query_params[:order] = opts[:order] unless opts[:order].nil?
1058
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
1059
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
1060
+
1061
+ # header parameters
1062
+ header_params = opts[:header_params] || {}
1063
+ # HTTP header 'Accept' (if needed)
1064
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1065
+
1066
+ # form parameters
1067
+ form_params = opts[:form_params] || {}
1068
+
1069
+ # http body (model)
1070
+ post_body = opts[:debug_body]
1071
+
1072
+ # return_type
1073
+ return_type = opts[:debug_return_type] || 'PackUsers'
1074
+
1075
+ # auth_names
1076
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1077
+
1078
+ new_options = opts.merge(
1079
+ operation: :'PackApi.list_pack_users',
1080
+ header_params: header_params,
1081
+ query_params: query_params,
1082
+ form_params: form_params,
1083
+ body: post_body,
1084
+ auth_names: auth_names,
1085
+ return_type: return_type
1086
+ )
1087
+
1088
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1089
+ if @api_client.config.debugging
1090
+ @api_client.config.logger.debug "API called: PackApi#list_pack_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1091
+ end
1092
+ [data, status_code, headers]
1093
+ end
1094
+
1095
+ # Fetch all available packs
1096
+ # @param [Hash] opts the optional parameters
1097
+ # @option opts [String] :search Search query
1098
+ # @option opts [String] :sort Sorting column (default to 'name')
1099
+ # @option opts [String] :order Sorting order (default to 'asc')
1100
+ # @option opts [Integer] :limit Paging limit (default to 100)
1101
+ # @option opts [Integer] :offset Paging offset (default to 0)
1102
+ # @return [Packs]
1103
+ def list_packs(opts = {})
1104
+ data, _status_code, _headers = list_packs_with_http_info(opts)
1105
+ data
1106
+ end
1107
+
1108
+ # Fetch all available packs
1109
+ # @param [Hash] opts the optional parameters
1110
+ # @option opts [String] :search Search query
1111
+ # @option opts [String] :sort Sorting column (default to 'name')
1112
+ # @option opts [String] :order Sorting order (default to 'asc')
1113
+ # @option opts [Integer] :limit Paging limit (default to 100)
1114
+ # @option opts [Integer] :offset Paging offset (default to 0)
1115
+ # @return [Array<(Packs, Integer, Hash)>] Packs data, response status code and response headers
1116
+ def list_packs_with_http_info(opts = {})
1117
+ if @api_client.config.debugging
1118
+ @api_client.config.logger.debug 'Calling API: PackApi.list_packs ...'
1119
+ end
1120
+ allowable_values = %w[name public]
1121
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
1122
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1123
+ end
1124
+
1125
+ allowable_values = %w[asc desc]
1126
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
1127
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
1128
+ end
1129
+
1130
+ # resource path
1131
+ local_var_path = '/packs'
1132
+
1133
+ # query parameters
1134
+ query_params = opts[:query_params] || {}
1135
+ query_params[:search] = opts[:search] unless opts[:search].nil?
1136
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
1137
+ query_params[:order] = opts[:order] unless opts[:order].nil?
1138
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
1139
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
1140
+
1141
+ # header parameters
1142
+ header_params = opts[:header_params] || {}
1143
+ # HTTP header 'Accept' (if needed)
1144
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1145
+
1146
+ # form parameters
1147
+ form_params = opts[:form_params] || {}
1148
+
1149
+ # http body (model)
1150
+ post_body = opts[:debug_body]
1151
+
1152
+ # return_type
1153
+ return_type = opts[:debug_return_type] || 'Packs'
1154
+
1155
+ # auth_names
1156
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1157
+
1158
+ new_options = opts.merge(
1159
+ operation: :'PackApi.list_packs',
1160
+ header_params: header_params,
1161
+ query_params: query_params,
1162
+ form_params: form_params,
1163
+ body: post_body,
1164
+ auth_names: auth_names,
1165
+ return_type: return_type
1166
+ )
1167
+
1168
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1169
+ if @api_client.config.debugging
1170
+ @api_client.config.logger.debug "API called: PackApi#list_packs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1171
+ end
1172
+ [data, status_code, headers]
1173
+ end
1174
+
1175
+ # Update team perms for pack
1176
+ # @param pack_id [String] A pack identifier or slug
1177
+ # @param pack_team_params [PackTeamParams] The team data to update
1178
+ # @param [Hash] opts the optional parameters
1179
+ # @return [Notification]
1180
+ def permit_pack_team(pack_id, pack_team_params, opts = {})
1181
+ data, _status_code, _headers = permit_pack_team_with_http_info(pack_id, pack_team_params, opts)
1182
+ data
1183
+ end
1184
+
1185
+ # Update team perms for pack
1186
+ # @param pack_id [String] A pack identifier or slug
1187
+ # @param pack_team_params [PackTeamParams] The team data to update
1188
+ # @param [Hash] opts the optional parameters
1189
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
1190
+ def permit_pack_team_with_http_info(pack_id, pack_team_params, opts = {})
1191
+ if @api_client.config.debugging
1192
+ @api_client.config.logger.debug 'Calling API: PackApi.permit_pack_team ...'
1193
+ end
1194
+ # verify the required parameter 'pack_id' is set
1195
+ if @api_client.config.client_side_validation && pack_id.nil?
1196
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.permit_pack_team"
1197
+ end
1198
+ # verify the required parameter 'pack_team_params' is set
1199
+ if @api_client.config.client_side_validation && pack_team_params.nil?
1200
+ raise ArgumentError, "Missing the required parameter 'pack_team_params' when calling PackApi.permit_pack_team"
1201
+ end
1202
+
1203
+ # resource path
1204
+ local_var_path = '/packs/{pack_id}/teams'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
1205
+
1206
+ # query parameters
1207
+ query_params = opts[:query_params] || {}
1208
+
1209
+ # header parameters
1210
+ header_params = opts[:header_params] || {}
1211
+ # HTTP header 'Accept' (if needed)
1212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1213
+ # HTTP header 'Content-Type'
1214
+ content_type = @api_client.select_header_content_type(['application/json'])
1215
+ unless content_type.nil?
1216
+ header_params['Content-Type'] = content_type
1217
+ end
1218
+
1219
+ # form parameters
1220
+ form_params = opts[:form_params] || {}
1221
+
1222
+ # http body (model)
1223
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack_team_params)
1224
+
1225
+ # return_type
1226
+ return_type = opts[:debug_return_type] || 'Notification'
1227
+
1228
+ # auth_names
1229
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1230
+
1231
+ new_options = opts.merge(
1232
+ operation: :'PackApi.permit_pack_team',
1233
+ header_params: header_params,
1234
+ query_params: query_params,
1235
+ form_params: form_params,
1236
+ body: post_body,
1237
+ auth_names: auth_names,
1238
+ return_type: return_type
1239
+ )
1240
+
1241
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1242
+ if @api_client.config.debugging
1243
+ @api_client.config.logger.debug "API called: PackApi#permit_pack_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1244
+ end
1245
+ [data, status_code, headers]
1246
+ end
1247
+
1248
+ # Update user perms for pack
1249
+ # @param pack_id [String] A pack identifier or slug
1250
+ # @param pack_user_params [PackUserParams] The user data to update
1251
+ # @param [Hash] opts the optional parameters
1252
+ # @return [Notification]
1253
+ def permit_pack_user(pack_id, pack_user_params, opts = {})
1254
+ data, _status_code, _headers = permit_pack_user_with_http_info(pack_id, pack_user_params, opts)
1255
+ data
1256
+ end
1257
+
1258
+ # Update user perms for pack
1259
+ # @param pack_id [String] A pack identifier or slug
1260
+ # @param pack_user_params [PackUserParams] The user data to update
1261
+ # @param [Hash] opts the optional parameters
1262
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
1263
+ def permit_pack_user_with_http_info(pack_id, pack_user_params, opts = {})
1264
+ if @api_client.config.debugging
1265
+ @api_client.config.logger.debug 'Calling API: PackApi.permit_pack_user ...'
1266
+ end
1267
+ # verify the required parameter 'pack_id' is set
1268
+ if @api_client.config.client_side_validation && pack_id.nil?
1269
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.permit_pack_user"
1270
+ end
1271
+ # verify the required parameter 'pack_user_params' is set
1272
+ if @api_client.config.client_side_validation && pack_user_params.nil?
1273
+ raise ArgumentError, "Missing the required parameter 'pack_user_params' when calling PackApi.permit_pack_user"
1274
+ end
1275
+
1276
+ # resource path
1277
+ local_var_path = '/packs/{pack_id}/users'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
1278
+
1279
+ # query parameters
1280
+ query_params = opts[:query_params] || {}
1281
+
1282
+ # header parameters
1283
+ header_params = opts[:header_params] || {}
1284
+ # HTTP header 'Accept' (if needed)
1285
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1286
+ # HTTP header 'Content-Type'
1287
+ content_type = @api_client.select_header_content_type(['application/json'])
1288
+ unless content_type.nil?
1289
+ header_params['Content-Type'] = content_type
1290
+ end
1291
+
1292
+ # form parameters
1293
+ form_params = opts[:form_params] || {}
1294
+
1295
+ # http body (model)
1296
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack_user_params)
1297
+
1298
+ # return_type
1299
+ return_type = opts[:debug_return_type] || 'Notification'
1300
+
1301
+ # auth_names
1302
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1303
+
1304
+ new_options = opts.merge(
1305
+ operation: :'PackApi.permit_pack_user',
1306
+ header_params: header_params,
1307
+ query_params: query_params,
1308
+ form_params: form_params,
1309
+ body: post_body,
1310
+ auth_names: auth_names,
1311
+ return_type: return_type
1312
+ )
1313
+
1314
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1315
+ if @api_client.config.debugging
1316
+ @api_client.config.logger.debug "API called: PackApi#permit_pack_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1317
+ end
1318
+ [data, status_code, headers]
1319
+ end
1320
+
1321
+ # Fetch a specific build for a pack
1322
+ # @param pack_id [String] A pack identifier or slug
1323
+ # @param build_id [String] A build identifier or slug
1324
+ # @param [Hash] opts the optional parameters
1325
+ # @return [Build]
1326
+ def show_build(pack_id, build_id, opts = {})
1327
+ data, _status_code, _headers = show_build_with_http_info(pack_id, build_id, opts)
1328
+ data
1329
+ end
1330
+
1331
+ # Fetch a specific build for a pack
1332
+ # @param pack_id [String] A pack identifier or slug
1333
+ # @param build_id [String] A build identifier or slug
1334
+ # @param [Hash] opts the optional parameters
1335
+ # @return [Array<(Build, Integer, Hash)>] Build data, response status code and response headers
1336
+ def show_build_with_http_info(pack_id, build_id, opts = {})
1337
+ if @api_client.config.debugging
1338
+ @api_client.config.logger.debug 'Calling API: PackApi.show_build ...'
1339
+ end
1340
+ # verify the required parameter 'pack_id' is set
1341
+ if @api_client.config.client_side_validation && pack_id.nil?
1342
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.show_build"
1343
+ end
1344
+ # verify the required parameter 'build_id' is set
1345
+ if @api_client.config.client_side_validation && build_id.nil?
1346
+ raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.show_build"
1347
+ end
1348
+
1349
+ # resource path
1350
+ local_var_path = '/packs/{pack_id}/builds/{build_id}'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s)).sub('{' + 'build_id' + '}', CGI.escape(build_id.to_s))
1351
+
1352
+ # query parameters
1353
+ query_params = opts[:query_params] || {}
1354
+
1355
+ # header parameters
1356
+ header_params = opts[:header_params] || {}
1357
+ # HTTP header 'Accept' (if needed)
1358
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1359
+
1360
+ # form parameters
1361
+ form_params = opts[:form_params] || {}
1362
+
1363
+ # http body (model)
1364
+ post_body = opts[:debug_body]
1365
+
1366
+ # return_type
1367
+ return_type = opts[:debug_return_type] || 'Build'
1368
+
1369
+ # auth_names
1370
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1371
+
1372
+ new_options = opts.merge(
1373
+ operation: :'PackApi.show_build',
1374
+ header_params: header_params,
1375
+ query_params: query_params,
1376
+ form_params: form_params,
1377
+ body: post_body,
1378
+ auth_names: auth_names,
1379
+ return_type: return_type
1380
+ )
1381
+
1382
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1383
+ if @api_client.config.debugging
1384
+ @api_client.config.logger.debug "API called: PackApi#show_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1385
+ end
1386
+ [data, status_code, headers]
1387
+ end
1388
+
1389
+ # Fetch a specific pack
1390
+ # @param pack_id [String] A pack identifier or slug
1391
+ # @param [Hash] opts the optional parameters
1392
+ # @return [Pack]
1393
+ def show_pack(pack_id, opts = {})
1394
+ data, _status_code, _headers = show_pack_with_http_info(pack_id, opts)
1395
+ data
1396
+ end
1397
+
1398
+ # Fetch a specific pack
1399
+ # @param pack_id [String] A pack identifier or slug
1400
+ # @param [Hash] opts the optional parameters
1401
+ # @return [Array<(Pack, Integer, Hash)>] Pack data, response status code and response headers
1402
+ def show_pack_with_http_info(pack_id, opts = {})
1403
+ if @api_client.config.debugging
1404
+ @api_client.config.logger.debug 'Calling API: PackApi.show_pack ...'
1405
+ end
1406
+ # verify the required parameter 'pack_id' is set
1407
+ if @api_client.config.client_side_validation && pack_id.nil?
1408
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.show_pack"
1409
+ end
1410
+
1411
+ # resource path
1412
+ local_var_path = '/packs/{pack_id}'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
1413
+
1414
+ # query parameters
1415
+ query_params = opts[:query_params] || {}
1416
+
1417
+ # header parameters
1418
+ header_params = opts[:header_params] || {}
1419
+ # HTTP header 'Accept' (if needed)
1420
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1421
+
1422
+ # form parameters
1423
+ form_params = opts[:form_params] || {}
1424
+
1425
+ # http body (model)
1426
+ post_body = opts[:debug_body]
1427
+
1428
+ # return_type
1429
+ return_type = opts[:debug_return_type] || 'Pack'
1430
+
1431
+ # auth_names
1432
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1433
+
1434
+ new_options = opts.merge(
1435
+ operation: :'PackApi.show_pack',
1436
+ header_params: header_params,
1437
+ query_params: query_params,
1438
+ form_params: form_params,
1439
+ body: post_body,
1440
+ auth_names: auth_names,
1441
+ return_type: return_type
1442
+ )
1443
+
1444
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1445
+ if @api_client.config.debugging
1446
+ @api_client.config.logger.debug "API called: PackApi#show_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1447
+ end
1448
+ [data, status_code, headers]
1449
+ end
1450
+
1451
+ # Update a specific build for a pack
1452
+ # @param pack_id [String] A pack identifier or slug
1453
+ # @param build_id [String] A build identifier or slug
1454
+ # @param build [Build] The build data to update
1455
+ # @param [Hash] opts the optional parameters
1456
+ # @return [Build]
1457
+ def update_build(pack_id, build_id, build, opts = {})
1458
+ data, _status_code, _headers = update_build_with_http_info(pack_id, build_id, build, opts)
1459
+ data
1460
+ end
1461
+
1462
+ # Update a specific build for a pack
1463
+ # @param pack_id [String] A pack identifier or slug
1464
+ # @param build_id [String] A build identifier or slug
1465
+ # @param build [Build] The build data to update
1466
+ # @param [Hash] opts the optional parameters
1467
+ # @return [Array<(Build, Integer, Hash)>] Build data, response status code and response headers
1468
+ def update_build_with_http_info(pack_id, build_id, build, opts = {})
1469
+ if @api_client.config.debugging
1470
+ @api_client.config.logger.debug 'Calling API: PackApi.update_build ...'
1471
+ end
1472
+ # verify the required parameter 'pack_id' is set
1473
+ if @api_client.config.client_side_validation && pack_id.nil?
1474
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.update_build"
1475
+ end
1476
+ # verify the required parameter 'build_id' is set
1477
+ if @api_client.config.client_side_validation && build_id.nil?
1478
+ raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.update_build"
1479
+ end
1480
+ # verify the required parameter 'build' is set
1481
+ if @api_client.config.client_side_validation && build.nil?
1482
+ raise ArgumentError, "Missing the required parameter 'build' when calling PackApi.update_build"
1483
+ end
1484
+
1485
+ # resource path
1486
+ local_var_path = '/packs/{pack_id}/builds/{build_id}'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s)).sub('{' + 'build_id' + '}', CGI.escape(build_id.to_s))
1487
+
1488
+ # query parameters
1489
+ query_params = opts[:query_params] || {}
1490
+
1491
+ # header parameters
1492
+ header_params = opts[:header_params] || {}
1493
+ # HTTP header 'Accept' (if needed)
1494
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1495
+ # HTTP header 'Content-Type'
1496
+ content_type = @api_client.select_header_content_type(['application/json'])
1497
+ unless content_type.nil?
1498
+ header_params['Content-Type'] = content_type
1499
+ end
1500
+
1501
+ # form parameters
1502
+ form_params = opts[:form_params] || {}
1503
+
1504
+ # http body (model)
1505
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(build)
1506
+
1507
+ # return_type
1508
+ return_type = opts[:debug_return_type] || 'Build'
1509
+
1510
+ # auth_names
1511
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1512
+
1513
+ new_options = opts.merge(
1514
+ operation: :'PackApi.update_build',
1515
+ header_params: header_params,
1516
+ query_params: query_params,
1517
+ form_params: form_params,
1518
+ body: post_body,
1519
+ auth_names: auth_names,
1520
+ return_type: return_type
1521
+ )
1522
+
1523
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1524
+ if @api_client.config.debugging
1525
+ @api_client.config.logger.debug "API called: PackApi#update_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1526
+ end
1527
+ [data, status_code, headers]
1528
+ end
1529
+
1530
+ # Update a specific pack
1531
+ # @param pack_id [String] A pack identifier or slug
1532
+ # @param pack [Pack] The pack data to update
1533
+ # @param [Hash] opts the optional parameters
1534
+ # @return [Pack]
1535
+ def update_pack(pack_id, pack, opts = {})
1536
+ data, _status_code, _headers = update_pack_with_http_info(pack_id, pack, opts)
1537
+ data
1538
+ end
1539
+
1540
+ # Update a specific pack
1541
+ # @param pack_id [String] A pack identifier or slug
1542
+ # @param pack [Pack] The pack data to update
1543
+ # @param [Hash] opts the optional parameters
1544
+ # @return [Array<(Pack, Integer, Hash)>] Pack data, response status code and response headers
1545
+ def update_pack_with_http_info(pack_id, pack, opts = {})
1546
+ if @api_client.config.debugging
1547
+ @api_client.config.logger.debug 'Calling API: PackApi.update_pack ...'
1548
+ end
1549
+ # verify the required parameter 'pack_id' is set
1550
+ if @api_client.config.client_side_validation && pack_id.nil?
1551
+ raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.update_pack"
1552
+ end
1553
+ # verify the required parameter 'pack' is set
1554
+ if @api_client.config.client_side_validation && pack.nil?
1555
+ raise ArgumentError, "Missing the required parameter 'pack' when calling PackApi.update_pack"
1556
+ end
1557
+
1558
+ # resource path
1559
+ local_var_path = '/packs/{pack_id}'.sub('{' + 'pack_id' + '}', CGI.escape(pack_id.to_s))
1560
+
1561
+ # query parameters
1562
+ query_params = opts[:query_params] || {}
1563
+
1564
+ # header parameters
1565
+ header_params = opts[:header_params] || {}
1566
+ # HTTP header 'Accept' (if needed)
1567
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1568
+ # HTTP header 'Content-Type'
1569
+ content_type = @api_client.select_header_content_type(['application/json'])
1570
+ unless content_type.nil?
1571
+ header_params['Content-Type'] = content_type
1572
+ end
1573
+
1574
+ # form parameters
1575
+ form_params = opts[:form_params] || {}
1576
+
1577
+ # http body (model)
1578
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pack)
1579
+
1580
+ # return_type
1581
+ return_type = opts[:debug_return_type] || 'Pack'
1582
+
1583
+ # auth_names
1584
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1585
+
1586
+ new_options = opts.merge(
1587
+ operation: :'PackApi.update_pack',
1588
+ header_params: header_params,
1589
+ query_params: query_params,
1590
+ form_params: form_params,
1591
+ body: post_body,
1592
+ auth_names: auth_names,
1593
+ return_type: return_type
1594
+ )
1595
+
1596
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1597
+ if @api_client.config.debugging
1598
+ @api_client.config.logger.debug "API called: PackApi#update_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1599
+ end
1600
+ [data, status_code, headers]
1601
+ end
1602
+ end
1603
+ end