pulp_deb_client 2.0.0b2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +163 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentGenericContentsApi.md +194 -0
  7. data/docs/ContentInstallerFileIndexApi.md +186 -0
  8. data/docs/ContentInstallerPackagesApi.md +194 -0
  9. data/docs/ContentPackageIndexApi.md +186 -0
  10. data/docs/ContentPackagesApi.md +194 -0
  11. data/docs/ContentReleasesApi.md +186 -0
  12. data/docs/DebDistribution.md +29 -0
  13. data/docs/DebPublication.md +31 -0
  14. data/docs/DebRemote.md +57 -0
  15. data/docs/DistributionsAptApi.md +358 -0
  16. data/docs/GenericContent.md +41 -0
  17. data/docs/InlineResponse200.md +23 -0
  18. data/docs/InlineResponse2001.md +23 -0
  19. data/docs/InlineResponse2002.md +23 -0
  20. data/docs/InlineResponse2003.md +23 -0
  21. data/docs/InlineResponse2004.md +23 -0
  22. data/docs/InlineResponse2005.md +23 -0
  23. data/docs/InlineResponse2006.md +23 -0
  24. data/docs/InlineResponse2007.md +23 -0
  25. data/docs/InlineResponse2008.md +23 -0
  26. data/docs/InlineResponse2009.md +23 -0
  27. data/docs/InstallerFileIndex.md +31 -0
  28. data/docs/InstallerPackage.md +99 -0
  29. data/docs/Package.md +99 -0
  30. data/docs/PackageIndex.md +31 -0
  31. data/docs/PublicationsAptApi.md +235 -0
  32. data/docs/PublicationsVerbatimApi.md +235 -0
  33. data/docs/Release.md +31 -0
  34. data/docs/RemotesAptApi.md +417 -0
  35. data/docs/RepositorySyncURL.md +19 -0
  36. data/docs/VerbatimPublication.md +27 -0
  37. data/git_push.sh +58 -0
  38. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +239 -0
  39. data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +225 -0
  40. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +235 -0
  41. data/lib/pulp_deb_client/api/content_package_index_api.rb +225 -0
  42. data/lib/pulp_deb_client/api/content_packages_api.rb +235 -0
  43. data/lib/pulp_deb_client/api/content_releases_api.rb +225 -0
  44. data/lib/pulp_deb_client/api/distributions_apt_api.rb +436 -0
  45. data/lib/pulp_deb_client/api/publications_apt_api.rb +279 -0
  46. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +279 -0
  47. data/lib/pulp_deb_client/api/remotes_apt_api.rb +510 -0
  48. data/lib/pulp_deb_client/api_client.rb +402 -0
  49. data/lib/pulp_deb_client/api_error.rb +57 -0
  50. data/lib/pulp_deb_client/configuration.rb +243 -0
  51. data/lib/pulp_deb_client/models/async_operation_response.rb +202 -0
  52. data/lib/pulp_deb_client/models/deb_distribution.rb +337 -0
  53. data/lib/pulp_deb_client/models/deb_publication.rb +282 -0
  54. data/lib/pulp_deb_client/models/deb_remote.rb +653 -0
  55. data/lib/pulp_deb_client/models/generic_content.rb +444 -0
  56. data/lib/pulp_deb_client/models/inline_response200.rb +235 -0
  57. data/lib/pulp_deb_client/models/inline_response2001.rb +235 -0
  58. data/lib/pulp_deb_client/models/inline_response2002.rb +235 -0
  59. data/lib/pulp_deb_client/models/inline_response2003.rb +235 -0
  60. data/lib/pulp_deb_client/models/inline_response2004.rb +235 -0
  61. data/lib/pulp_deb_client/models/inline_response2005.rb +235 -0
  62. data/lib/pulp_deb_client/models/inline_response2006.rb +235 -0
  63. data/lib/pulp_deb_client/models/inline_response2007.rb +235 -0
  64. data/lib/pulp_deb_client/models/inline_response2008.rb +235 -0
  65. data/lib/pulp_deb_client/models/inline_response2009.rb +235 -0
  66. data/lib/pulp_deb_client/models/installer_file_index.rb +355 -0
  67. data/lib/pulp_deb_client/models/installer_package.rb +1101 -0
  68. data/lib/pulp_deb_client/models/package.rb +1101 -0
  69. data/lib/pulp_deb_client/models/package_index.rb +355 -0
  70. data/lib/pulp_deb_client/models/release.rb +356 -0
  71. data/lib/pulp_deb_client/models/repository_sync_url.rb +214 -0
  72. data/lib/pulp_deb_client/models/verbatim_publication.rb +258 -0
  73. data/lib/pulp_deb_client/version.rb +15 -0
  74. data/lib/pulp_deb_client.rb +71 -0
  75. data/pulp_deb_client.gemspec +39 -0
  76. data/spec/api/content_generic_contents_api_spec.rb +80 -0
  77. data/spec/api/content_installer_file_index_api_spec.rb +77 -0
  78. data/spec/api/content_installer_packages_api_spec.rb +80 -0
  79. data/spec/api/content_package_index_api_spec.rb +77 -0
  80. data/spec/api/content_packages_api_spec.rb +80 -0
  81. data/spec/api/content_releases_api_spec.rb +77 -0
  82. data/spec/api/distributions_apt_api_spec.rb +118 -0
  83. data/spec/api/publications_apt_api_spec.rb +87 -0
  84. data/spec/api/publications_verbatim_api_spec.rb +87 -0
  85. data/spec/api/remotes_apt_api_spec.rb +132 -0
  86. data/spec/api_client_spec.rb +188 -0
  87. data/spec/configuration_spec.rb +42 -0
  88. data/spec/models/async_operation_response_spec.rb +41 -0
  89. data/spec/models/deb_distribution_spec.rb +77 -0
  90. data/spec/models/deb_publication_spec.rb +83 -0
  91. data/spec/models/deb_remote_spec.rb +165 -0
  92. data/spec/models/generic_content_spec.rb +113 -0
  93. data/spec/models/inline_response2001_spec.rb +59 -0
  94. data/spec/models/inline_response2002_spec.rb +59 -0
  95. data/spec/models/inline_response2003_spec.rb +59 -0
  96. data/spec/models/inline_response2004_spec.rb +59 -0
  97. data/spec/models/inline_response2005_spec.rb +59 -0
  98. data/spec/models/inline_response2006_spec.rb +59 -0
  99. data/spec/models/inline_response2007_spec.rb +59 -0
  100. data/spec/models/inline_response2008_spec.rb +59 -0
  101. data/spec/models/inline_response2009_spec.rb +59 -0
  102. data/spec/models/inline_response200_spec.rb +59 -0
  103. data/spec/models/installer_file_index_spec.rb +83 -0
  104. data/spec/models/installer_package_spec.rb +287 -0
  105. data/spec/models/package_index_spec.rb +83 -0
  106. data/spec/models/package_spec.rb +287 -0
  107. data/spec/models/release_spec.rb +83 -0
  108. data/spec/models/repository_sync_url_spec.rb +47 -0
  109. data/spec/models/verbatim_publication_spec.rb +71 -0
  110. data/spec/spec_helper.rb +111 -0
  111. metadata +242 -0
@@ -0,0 +1,436 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.1.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpDebClient
16
+ class DistributionsAptApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a deb distribution
23
+ # Trigger an asynchronous create task
24
+ # @param data [DebDistribution]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a deb distribution
33
+ # Trigger an asynchronous create task
34
+ # @param data [DebDistribution]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DistributionsAptApi.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsAptApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/distributions/deb/apt/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: DistributionsAptApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a deb distribution
87
+ # Trigger an asynchronous delete task
88
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(deb_distribution_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(deb_distribution_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a deb distribution
97
+ # Trigger an asynchronous delete task
98
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(deb_distribution_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: DistributionsAptApi.delete ...'
104
+ end
105
+ # verify the required parameter 'deb_distribution_href' is set
106
+ if @api_client.config.client_side_validation && deb_distribution_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'deb_distribution_href' when calling DistributionsAptApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{deb_distribution_href}'.sub('{' + 'deb_distribution_href' + '}', CGI.escape(deb_distribution_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['Basic']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: DistributionsAptApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List deb distributions
149
+ # ViewSet for DebDistributions.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :name
152
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
153
+ # @option opts [String] :base_path
154
+ # @option opts [String] :base_path__contains Filter results where base_path contains value
155
+ # @option opts [String] :base_path__icontains Filter results where base_path contains value
156
+ # @option opts [String] :base_path__in Filter results where base_path is in a comma-separated list of values
157
+ # @option opts [Integer] :limit Number of results to return per page.
158
+ # @option opts [Integer] :offset The initial index from which to return the results.
159
+ # @option opts [String] :fields A list of fields to include in the response.
160
+ # @return [InlineResponse2006]
161
+ def list(opts = {})
162
+ data, _status_code, _headers = list_with_http_info(opts)
163
+ data
164
+ end
165
+
166
+ # List deb distributions
167
+ # ViewSet for DebDistributions.
168
+ # @param [Hash] opts the optional parameters
169
+ # @option opts [String] :name
170
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
171
+ # @option opts [String] :base_path
172
+ # @option opts [String] :base_path__contains Filter results where base_path contains value
173
+ # @option opts [String] :base_path__icontains Filter results where base_path contains value
174
+ # @option opts [String] :base_path__in Filter results where base_path is in a comma-separated list of values
175
+ # @option opts [Integer] :limit Number of results to return per page.
176
+ # @option opts [Integer] :offset The initial index from which to return the results.
177
+ # @option opts [String] :fields A list of fields to include in the response.
178
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
179
+ def list_with_http_info(opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug 'Calling API: DistributionsAptApi.list ...'
182
+ end
183
+ # resource path
184
+ local_var_path = '/pulp/api/v3/distributions/deb/apt/'
185
+
186
+ # query parameters
187
+ query_params = opts[:query_params] || {}
188
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
189
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
190
+ query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
191
+ query_params[:'base_path__contains'] = opts[:'base_path__contains'] if !opts[:'base_path__contains'].nil?
192
+ query_params[:'base_path__icontains'] = opts[:'base_path__icontains'] if !opts[:'base_path__icontains'].nil?
193
+ query_params[:'base_path__in'] = opts[:'base_path__in'] if !opts[:'base_path__in'].nil?
194
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
195
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
196
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
197
+
198
+ # header parameters
199
+ header_params = opts[:header_params] || {}
200
+ # HTTP header 'Accept' (if needed)
201
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
202
+
203
+ # form parameters
204
+ form_params = opts[:form_params] || {}
205
+
206
+ # http body (model)
207
+ post_body = opts[:body]
208
+
209
+ # return_type
210
+ return_type = opts[:return_type] || 'InlineResponse2006'
211
+
212
+ # auth_names
213
+ auth_names = opts[:auth_names] || ['Basic']
214
+
215
+ new_options = opts.merge(
216
+ :header_params => header_params,
217
+ :query_params => query_params,
218
+ :form_params => form_params,
219
+ :body => post_body,
220
+ :auth_names => auth_names,
221
+ :return_type => return_type
222
+ )
223
+
224
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug "API called: DistributionsAptApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
227
+ end
228
+ return data, status_code, headers
229
+ end
230
+
231
+ # Partially update a deb distribution
232
+ # Trigger an asynchronous partial update task
233
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
234
+ # @param data [DebDistribution]
235
+ # @param [Hash] opts the optional parameters
236
+ # @return [AsyncOperationResponse]
237
+ def partial_update(deb_distribution_href, data, opts = {})
238
+ data, _status_code, _headers = partial_update_with_http_info(deb_distribution_href, data, opts)
239
+ data
240
+ end
241
+
242
+ # Partially update a deb distribution
243
+ # Trigger an asynchronous partial update task
244
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
245
+ # @param data [DebDistribution]
246
+ # @param [Hash] opts the optional parameters
247
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
248
+ def partial_update_with_http_info(deb_distribution_href, data, opts = {})
249
+ if @api_client.config.debugging
250
+ @api_client.config.logger.debug 'Calling API: DistributionsAptApi.partial_update ...'
251
+ end
252
+ # verify the required parameter 'deb_distribution_href' is set
253
+ if @api_client.config.client_side_validation && deb_distribution_href.nil?
254
+ fail ArgumentError, "Missing the required parameter 'deb_distribution_href' when calling DistributionsAptApi.partial_update"
255
+ end
256
+ # verify the required parameter 'data' is set
257
+ if @api_client.config.client_side_validation && data.nil?
258
+ fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsAptApi.partial_update"
259
+ end
260
+ # resource path
261
+ local_var_path = '{deb_distribution_href}'.sub('{' + 'deb_distribution_href' + '}', CGI.escape(deb_distribution_href.to_s).gsub('%2F', '/'))
262
+
263
+ # query parameters
264
+ query_params = opts[:query_params] || {}
265
+
266
+ # header parameters
267
+ header_params = opts[:header_params] || {}
268
+ # HTTP header 'Accept' (if needed)
269
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
270
+ # HTTP header 'Content-Type'
271
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
272
+
273
+ # form parameters
274
+ form_params = opts[:form_params] || {}
275
+
276
+ # http body (model)
277
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
278
+
279
+ # return_type
280
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
281
+
282
+ # auth_names
283
+ auth_names = opts[:auth_names] || ['Basic']
284
+
285
+ new_options = opts.merge(
286
+ :header_params => header_params,
287
+ :query_params => query_params,
288
+ :form_params => form_params,
289
+ :body => post_body,
290
+ :auth_names => auth_names,
291
+ :return_type => return_type
292
+ )
293
+
294
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
295
+ if @api_client.config.debugging
296
+ @api_client.config.logger.debug "API called: DistributionsAptApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
297
+ end
298
+ return data, status_code, headers
299
+ end
300
+
301
+ # Inspect a deb distribution
302
+ # ViewSet for DebDistributions.
303
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
304
+ # @param [Hash] opts the optional parameters
305
+ # @option opts [String] :fields A list of fields to include in the response.
306
+ # @return [DebDistribution]
307
+ def read(deb_distribution_href, opts = {})
308
+ data, _status_code, _headers = read_with_http_info(deb_distribution_href, opts)
309
+ data
310
+ end
311
+
312
+ # Inspect a deb distribution
313
+ # ViewSet for DebDistributions.
314
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
315
+ # @param [Hash] opts the optional parameters
316
+ # @option opts [String] :fields A list of fields to include in the response.
317
+ # @return [Array<(DebDistribution, Integer, Hash)>] DebDistribution data, response status code and response headers
318
+ def read_with_http_info(deb_distribution_href, opts = {})
319
+ if @api_client.config.debugging
320
+ @api_client.config.logger.debug 'Calling API: DistributionsAptApi.read ...'
321
+ end
322
+ # verify the required parameter 'deb_distribution_href' is set
323
+ if @api_client.config.client_side_validation && deb_distribution_href.nil?
324
+ fail ArgumentError, "Missing the required parameter 'deb_distribution_href' when calling DistributionsAptApi.read"
325
+ end
326
+ # resource path
327
+ local_var_path = '{deb_distribution_href}'.sub('{' + 'deb_distribution_href' + '}', CGI.escape(deb_distribution_href.to_s).gsub('%2F', '/'))
328
+
329
+ # query parameters
330
+ query_params = opts[:query_params] || {}
331
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
332
+
333
+ # header parameters
334
+ header_params = opts[:header_params] || {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:body]
343
+
344
+ # return_type
345
+ return_type = opts[:return_type] || 'DebDistribution'
346
+
347
+ # auth_names
348
+ auth_names = opts[:auth_names] || ['Basic']
349
+
350
+ new_options = opts.merge(
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => return_type
357
+ )
358
+
359
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: DistributionsAptApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+
366
+ # Update a deb distribution
367
+ # Trigger an asynchronous update task
368
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
369
+ # @param data [DebDistribution]
370
+ # @param [Hash] opts the optional parameters
371
+ # @return [AsyncOperationResponse]
372
+ def update(deb_distribution_href, data, opts = {})
373
+ data, _status_code, _headers = update_with_http_info(deb_distribution_href, data, opts)
374
+ data
375
+ end
376
+
377
+ # Update a deb distribution
378
+ # Trigger an asynchronous update task
379
+ # @param deb_distribution_href [String] URI of Deb Distribution. e.g.: /pulp/api/v3/distributions/deb/apt/1/
380
+ # @param data [DebDistribution]
381
+ # @param [Hash] opts the optional parameters
382
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
383
+ def update_with_http_info(deb_distribution_href, data, opts = {})
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug 'Calling API: DistributionsAptApi.update ...'
386
+ end
387
+ # verify the required parameter 'deb_distribution_href' is set
388
+ if @api_client.config.client_side_validation && deb_distribution_href.nil?
389
+ fail ArgumentError, "Missing the required parameter 'deb_distribution_href' when calling DistributionsAptApi.update"
390
+ end
391
+ # verify the required parameter 'data' is set
392
+ if @api_client.config.client_side_validation && data.nil?
393
+ fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsAptApi.update"
394
+ end
395
+ # resource path
396
+ local_var_path = '{deb_distribution_href}'.sub('{' + 'deb_distribution_href' + '}', CGI.escape(deb_distribution_href.to_s).gsub('%2F', '/'))
397
+
398
+ # query parameters
399
+ query_params = opts[:query_params] || {}
400
+
401
+ # header parameters
402
+ header_params = opts[:header_params] || {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+ # HTTP header 'Content-Type'
406
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = opts[:form_params] || {}
410
+
411
+ # http body (model)
412
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
413
+
414
+ # return_type
415
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
416
+
417
+ # auth_names
418
+ auth_names = opts[:auth_names] || ['Basic']
419
+
420
+ new_options = opts.merge(
421
+ :header_params => header_params,
422
+ :query_params => query_params,
423
+ :form_params => form_params,
424
+ :body => post_body,
425
+ :auth_names => auth_names,
426
+ :return_type => return_type
427
+ )
428
+
429
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: DistributionsAptApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+ end
436
+ end