pulp_deb_client 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -16
  3. data/docs/AcsDebApi.md +886 -0
  4. data/docs/DebAptAlternateContentSource.md +24 -0
  5. data/docs/DebAptAlternateContentSourceResponse.md +32 -0
  6. data/docs/DebAptRepository.md +2 -0
  7. data/docs/DebAptRepositoryResponse.md +2 -0
  8. data/docs/DistributionsAptApi.md +10 -10
  9. data/docs/PaginateddebAptAlternateContentSourceResponseList.md +24 -0
  10. data/docs/PatcheddebAptAlternateContentSource.md +24 -0
  11. data/docs/PatcheddebAptRepository.md +2 -0
  12. data/docs/RemotesAptApi.md +10 -10
  13. data/docs/RepositoriesAptApi.md +10 -10
  14. data/docs/TaskGroupOperationResponse.md +18 -0
  15. data/lib/pulp_deb_client/api/acs_deb_api.rb +865 -0
  16. data/lib/pulp_deb_client/api/distributions_apt_api.rb +10 -10
  17. data/lib/pulp_deb_client/api/remotes_apt_api.rb +10 -10
  18. data/lib/pulp_deb_client/api/repositories_apt_api.rb +10 -10
  19. data/lib/pulp_deb_client/models/deb_apt_alternate_content_source.rb +282 -0
  20. data/lib/pulp_deb_client/models/deb_apt_alternate_content_source_response.rb +302 -0
  21. data/lib/pulp_deb_client/models/deb_apt_repository.rb +13 -1
  22. data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +13 -1
  23. data/lib/pulp_deb_client/models/paginateddeb_apt_alternate_content_source_response_list.rb +257 -0
  24. data/lib/pulp_deb_client/models/patcheddeb_apt_alternate_content_source.rb +268 -0
  25. data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +13 -1
  26. data/lib/pulp_deb_client/models/task_group_operation_response.rb +223 -0
  27. data/lib/pulp_deb_client/version.rb +1 -1
  28. data/lib/pulp_deb_client.rb +6 -0
  29. data/spec/api/acs_deb_api_spec.rb +204 -0
  30. data/spec/api/distributions_apt_api_spec.rb +4 -4
  31. data/spec/api/remotes_apt_api_spec.rb +4 -4
  32. data/spec/api/repositories_apt_api_spec.rb +4 -4
  33. data/spec/models/deb_apt_alternate_content_source_response_spec.rb +78 -0
  34. data/spec/models/deb_apt_alternate_content_source_spec.rb +54 -0
  35. data/spec/models/deb_apt_repository_response_spec.rb +6 -0
  36. data/spec/models/deb_apt_repository_spec.rb +6 -0
  37. data/spec/models/paginateddeb_apt_alternate_content_source_response_list_spec.rb +54 -0
  38. data/spec/models/patcheddeb_apt_alternate_content_source_spec.rb +54 -0
  39. data/spec/models/patcheddeb_apt_repository_spec.rb +6 -0
  40. data/spec/models/task_group_operation_response_spec.rb +36 -0
  41. metadata +97 -73
@@ -0,0 +1,865 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpDebClient
16
+ class AcsDebApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add a role
23
+ # Add a role for this object to users/groups.
24
+ # @param deb_apt_alternate_content_source_href [String]
25
+ # @param nested_role [NestedRole]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
28
+ # @return [NestedRoleResponse]
29
+ def add_role(deb_apt_alternate_content_source_href, nested_role, opts = {})
30
+ data, _status_code, _headers = add_role_with_http_info(deb_apt_alternate_content_source_href, nested_role, opts)
31
+ data
32
+ end
33
+
34
+ # Add a role
35
+ # Add a role for this object to users/groups.
36
+ # @param deb_apt_alternate_content_source_href [String]
37
+ # @param nested_role [NestedRole]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
40
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
41
+ def add_role_with_http_info(deb_apt_alternate_content_source_href, nested_role, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.add_role ...'
44
+ end
45
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
46
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
47
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.add_role"
48
+ end
49
+ # verify the required parameter 'nested_role' is set
50
+ if @api_client.config.client_side_validation && nested_role.nil?
51
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling AcsDebApi.add_role"
52
+ end
53
+ # resource path
54
+ local_var_path = '{deb_apt_alternate_content_source_href}add_role/'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
63
+ # HTTP header 'Content-Type'
64
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
65
+ if !content_type.nil?
66
+ header_params['Content-Type'] = content_type
67
+ end
68
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nested_role)
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'NestedRoleResponse'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"AcsDebApi.add_role",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: AcsDebApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Create an apt alternate content source
100
+ # ViewSet for ACS.
101
+ # @param deb_apt_alternate_content_source [DebAptAlternateContentSource]
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
104
+ # @return [DebAptAlternateContentSourceResponse]
105
+ def create(deb_apt_alternate_content_source, opts = {})
106
+ data, _status_code, _headers = create_with_http_info(deb_apt_alternate_content_source, opts)
107
+ data
108
+ end
109
+
110
+ # Create an apt alternate content source
111
+ # ViewSet for ACS.
112
+ # @param deb_apt_alternate_content_source [DebAptAlternateContentSource]
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
115
+ # @return [Array<(DebAptAlternateContentSourceResponse, Integer, Hash)>] DebAptAlternateContentSourceResponse data, response status code and response headers
116
+ def create_with_http_info(deb_apt_alternate_content_source, opts = {})
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.create ...'
119
+ end
120
+ # verify the required parameter 'deb_apt_alternate_content_source' is set
121
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source.nil?
122
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source' when calling AcsDebApi.create"
123
+ end
124
+ # resource path
125
+ local_var_path = '/pulp/api/v3/acs/deb/deb/'
126
+
127
+ # query parameters
128
+ query_params = opts[:query_params] || {}
129
+
130
+ # header parameters
131
+ header_params = opts[:header_params] || {}
132
+ # HTTP header 'Accept' (if needed)
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
134
+ # HTTP header 'Content-Type'
135
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
136
+ if !content_type.nil?
137
+ header_params['Content-Type'] = content_type
138
+ end
139
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
140
+
141
+ # form parameters
142
+ form_params = opts[:form_params] || {}
143
+
144
+ # http body (model)
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(deb_apt_alternate_content_source)
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'DebAptAlternateContentSourceResponse'
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"AcsDebApi.create",
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: AcsDebApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Delete an apt alternate content source
171
+ # Trigger an asynchronous delete ACS task
172
+ # @param deb_apt_alternate_content_source_href [String]
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
175
+ # @return [AsyncOperationResponse]
176
+ def delete(deb_apt_alternate_content_source_href, opts = {})
177
+ data, _status_code, _headers = delete_with_http_info(deb_apt_alternate_content_source_href, opts)
178
+ data
179
+ end
180
+
181
+ # Delete an apt alternate content source
182
+ # Trigger an asynchronous delete ACS task
183
+ # @param deb_apt_alternate_content_source_href [String]
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
186
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
187
+ def delete_with_http_info(deb_apt_alternate_content_source_href, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.delete ...'
190
+ end
191
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
192
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
193
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.delete"
194
+ end
195
+ # resource path
196
+ local_var_path = '{deb_apt_alternate_content_source_href}'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
197
+
198
+ # query parameters
199
+ query_params = opts[:query_params] || {}
200
+
201
+ # header parameters
202
+ header_params = opts[:header_params] || {}
203
+ # HTTP header 'Accept' (if needed)
204
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
205
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
206
+
207
+ # form parameters
208
+ form_params = opts[:form_params] || {}
209
+
210
+ # http body (model)
211
+ post_body = opts[:debug_body]
212
+
213
+ # return_type
214
+ return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
215
+
216
+ # auth_names
217
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
218
+
219
+ new_options = opts.merge(
220
+ :operation => :"AcsDebApi.delete",
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => return_type
227
+ )
228
+
229
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug "API called: AcsDebApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
232
+ end
233
+ return data, status_code, headers
234
+ end
235
+
236
+ # List apt alternate content sources
237
+ # ViewSet for ACS.
238
+ # @param [Hash] opts the optional parameters
239
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
240
+ # @option opts [Integer] :limit Number of results to return per page.
241
+ # @option opts [String] :name Filter results where name matches value
242
+ # @option opts [String] :name__contains Filter results where name contains value
243
+ # @option opts [String] :name__icontains Filter results where name contains value
244
+ # @option opts [String] :name__iexact Filter results where name matches value
245
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
246
+ # @option opts [String] :name__iregex Filter results where name matches regex value
247
+ # @option opts [String] :name__istartswith Filter results where name starts with value
248
+ # @option opts [String] :name__regex Filter results where name matches regex value
249
+ # @option opts [String] :name__startswith Filter results where name starts with value
250
+ # @option opts [Integer] :offset The initial index from which to return the results.
251
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;last_refreshed&#x60; - Last refreshed * &#x60;-last_refreshed&#x60; - Last refreshed (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
252
+ # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
253
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
254
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
255
+ # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
256
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
257
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
258
+ # @return [PaginateddebAptAlternateContentSourceResponseList]
259
+ def list(opts = {})
260
+ data, _status_code, _headers = list_with_http_info(opts)
261
+ data
262
+ end
263
+
264
+ # List apt alternate content sources
265
+ # ViewSet for ACS.
266
+ # @param [Hash] opts the optional parameters
267
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
268
+ # @option opts [Integer] :limit Number of results to return per page.
269
+ # @option opts [String] :name Filter results where name matches value
270
+ # @option opts [String] :name__contains Filter results where name contains value
271
+ # @option opts [String] :name__icontains Filter results where name contains value
272
+ # @option opts [String] :name__iexact Filter results where name matches value
273
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
274
+ # @option opts [String] :name__iregex Filter results where name matches regex value
275
+ # @option opts [String] :name__istartswith Filter results where name starts with value
276
+ # @option opts [String] :name__regex Filter results where name matches regex value
277
+ # @option opts [String] :name__startswith Filter results where name starts with value
278
+ # @option opts [Integer] :offset The initial index from which to return the results.
279
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;last_refreshed&#x60; - Last refreshed * &#x60;-last_refreshed&#x60; - Last refreshed (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
280
+ # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
281
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
282
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
283
+ # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
284
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
285
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
286
+ # @return [Array<(PaginateddebAptAlternateContentSourceResponseList, Integer, Hash)>] PaginateddebAptAlternateContentSourceResponseList data, response status code and response headers
287
+ def list_with_http_info(opts = {})
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.list ...'
290
+ end
291
+ allowable_values = ["-last_refreshed", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-pulp_type", "last_refreshed", "name", "pk", "pulp_created", "pulp_id", "pulp_last_updated", "pulp_type"]
292
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
293
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
294
+ end
295
+ # resource path
296
+ local_var_path = '/pulp/api/v3/acs/deb/deb/'
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
301
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
302
+ query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
303
+ query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
304
+ query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
305
+ query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
306
+ query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
307
+ query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
308
+ query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
309
+ query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
310
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
311
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
312
+ query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
313
+ query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
314
+ query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
315
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
316
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
317
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
318
+
319
+ # header parameters
320
+ header_params = opts[:header_params] || {}
321
+ # HTTP header 'Accept' (if needed)
322
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
323
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
324
+
325
+ # form parameters
326
+ form_params = opts[:form_params] || {}
327
+
328
+ # http body (model)
329
+ post_body = opts[:debug_body]
330
+
331
+ # return_type
332
+ return_type = opts[:debug_return_type] || 'PaginateddebAptAlternateContentSourceResponseList'
333
+
334
+ # auth_names
335
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
336
+
337
+ new_options = opts.merge(
338
+ :operation => :"AcsDebApi.list",
339
+ :header_params => header_params,
340
+ :query_params => query_params,
341
+ :form_params => form_params,
342
+ :body => post_body,
343
+ :auth_names => auth_names,
344
+ :return_type => return_type
345
+ )
346
+
347
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug "API called: AcsDebApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
350
+ end
351
+ return data, status_code, headers
352
+ end
353
+
354
+ # List roles
355
+ # List roles assigned to this object.
356
+ # @param deb_apt_alternate_content_source_href [String]
357
+ # @param [Hash] opts the optional parameters
358
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
359
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
360
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
361
+ # @return [ObjectRolesResponse]
362
+ def list_roles(deb_apt_alternate_content_source_href, opts = {})
363
+ data, _status_code, _headers = list_roles_with_http_info(deb_apt_alternate_content_source_href, opts)
364
+ data
365
+ end
366
+
367
+ # List roles
368
+ # List roles assigned to this object.
369
+ # @param deb_apt_alternate_content_source_href [String]
370
+ # @param [Hash] opts the optional parameters
371
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
372
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
373
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
374
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
375
+ def list_roles_with_http_info(deb_apt_alternate_content_source_href, opts = {})
376
+ if @api_client.config.debugging
377
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.list_roles ...'
378
+ end
379
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
380
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
381
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.list_roles"
382
+ end
383
+ # resource path
384
+ local_var_path = '{deb_apt_alternate_content_source_href}list_roles/'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
385
+
386
+ # query parameters
387
+ query_params = opts[:query_params] || {}
388
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
389
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
390
+
391
+ # header parameters
392
+ header_params = opts[:header_params] || {}
393
+ # HTTP header 'Accept' (if needed)
394
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
395
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
396
+
397
+ # form parameters
398
+ form_params = opts[:form_params] || {}
399
+
400
+ # http body (model)
401
+ post_body = opts[:debug_body]
402
+
403
+ # return_type
404
+ return_type = opts[:debug_return_type] || 'ObjectRolesResponse'
405
+
406
+ # auth_names
407
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
408
+
409
+ new_options = opts.merge(
410
+ :operation => :"AcsDebApi.list_roles",
411
+ :header_params => header_params,
412
+ :query_params => query_params,
413
+ :form_params => form_params,
414
+ :body => post_body,
415
+ :auth_names => auth_names,
416
+ :return_type => return_type
417
+ )
418
+
419
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: AcsDebApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
424
+ end
425
+
426
+ # List user permissions
427
+ # List permissions available to the current user on this object.
428
+ # @param deb_apt_alternate_content_source_href [String]
429
+ # @param [Hash] opts the optional parameters
430
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
431
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
432
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
433
+ # @return [MyPermissionsResponse]
434
+ def my_permissions(deb_apt_alternate_content_source_href, opts = {})
435
+ data, _status_code, _headers = my_permissions_with_http_info(deb_apt_alternate_content_source_href, opts)
436
+ data
437
+ end
438
+
439
+ # List user permissions
440
+ # List permissions available to the current user on this object.
441
+ # @param deb_apt_alternate_content_source_href [String]
442
+ # @param [Hash] opts the optional parameters
443
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
444
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
445
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
446
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
447
+ def my_permissions_with_http_info(deb_apt_alternate_content_source_href, opts = {})
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.my_permissions ...'
450
+ end
451
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
452
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
453
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.my_permissions"
454
+ end
455
+ # resource path
456
+ local_var_path = '{deb_apt_alternate_content_source_href}my_permissions/'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
457
+
458
+ # query parameters
459
+ query_params = opts[:query_params] || {}
460
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
461
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
462
+
463
+ # header parameters
464
+ header_params = opts[:header_params] || {}
465
+ # HTTP header 'Accept' (if needed)
466
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
467
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
468
+
469
+ # form parameters
470
+ form_params = opts[:form_params] || {}
471
+
472
+ # http body (model)
473
+ post_body = opts[:debug_body]
474
+
475
+ # return_type
476
+ return_type = opts[:debug_return_type] || 'MyPermissionsResponse'
477
+
478
+ # auth_names
479
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
480
+
481
+ new_options = opts.merge(
482
+ :operation => :"AcsDebApi.my_permissions",
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type
489
+ )
490
+
491
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: AcsDebApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+
498
+ # Update an apt alternate content source
499
+ # Update the entity partially and trigger an asynchronous task if necessary
500
+ # @param deb_apt_alternate_content_source_href [String]
501
+ # @param patcheddeb_apt_alternate_content_source [PatcheddebAptAlternateContentSource]
502
+ # @param [Hash] opts the optional parameters
503
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
504
+ # @return [DebAptAlternateContentSourceResponse]
505
+ def partial_update(deb_apt_alternate_content_source_href, patcheddeb_apt_alternate_content_source, opts = {})
506
+ data, _status_code, _headers = partial_update_with_http_info(deb_apt_alternate_content_source_href, patcheddeb_apt_alternate_content_source, opts)
507
+ data
508
+ end
509
+
510
+ # Update an apt alternate content source
511
+ # Update the entity partially and trigger an asynchronous task if necessary
512
+ # @param deb_apt_alternate_content_source_href [String]
513
+ # @param patcheddeb_apt_alternate_content_source [PatcheddebAptAlternateContentSource]
514
+ # @param [Hash] opts the optional parameters
515
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
516
+ # @return [Array<(DebAptAlternateContentSourceResponse, Integer, Hash)>] DebAptAlternateContentSourceResponse data, response status code and response headers
517
+ def partial_update_with_http_info(deb_apt_alternate_content_source_href, patcheddeb_apt_alternate_content_source, opts = {})
518
+ if @api_client.config.debugging
519
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.partial_update ...'
520
+ end
521
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
522
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
523
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.partial_update"
524
+ end
525
+ # verify the required parameter 'patcheddeb_apt_alternate_content_source' is set
526
+ if @api_client.config.client_side_validation && patcheddeb_apt_alternate_content_source.nil?
527
+ fail ArgumentError, "Missing the required parameter 'patcheddeb_apt_alternate_content_source' when calling AcsDebApi.partial_update"
528
+ end
529
+ # resource path
530
+ local_var_path = '{deb_apt_alternate_content_source_href}'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
531
+
532
+ # query parameters
533
+ query_params = opts[:query_params] || {}
534
+
535
+ # header parameters
536
+ header_params = opts[:header_params] || {}
537
+ # HTTP header 'Accept' (if needed)
538
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
539
+ # HTTP header 'Content-Type'
540
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
541
+ if !content_type.nil?
542
+ header_params['Content-Type'] = content_type
543
+ end
544
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patcheddeb_apt_alternate_content_source)
551
+
552
+ # return_type
553
+ return_type = opts[:debug_return_type] || 'DebAptAlternateContentSourceResponse'
554
+
555
+ # auth_names
556
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
557
+
558
+ new_options = opts.merge(
559
+ :operation => :"AcsDebApi.partial_update",
560
+ :header_params => header_params,
561
+ :query_params => query_params,
562
+ :form_params => form_params,
563
+ :body => post_body,
564
+ :auth_names => auth_names,
565
+ :return_type => return_type
566
+ )
567
+
568
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "API called: AcsDebApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ end
572
+ return data, status_code, headers
573
+ end
574
+
575
+ # Inspect an apt alternate content source
576
+ # ViewSet for ACS.
577
+ # @param deb_apt_alternate_content_source_href [String]
578
+ # @param [Hash] opts the optional parameters
579
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
580
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
581
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
582
+ # @return [DebAptAlternateContentSourceResponse]
583
+ def read(deb_apt_alternate_content_source_href, opts = {})
584
+ data, _status_code, _headers = read_with_http_info(deb_apt_alternate_content_source_href, opts)
585
+ data
586
+ end
587
+
588
+ # Inspect an apt alternate content source
589
+ # ViewSet for ACS.
590
+ # @param deb_apt_alternate_content_source_href [String]
591
+ # @param [Hash] opts the optional parameters
592
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
593
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
594
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
595
+ # @return [Array<(DebAptAlternateContentSourceResponse, Integer, Hash)>] DebAptAlternateContentSourceResponse data, response status code and response headers
596
+ def read_with_http_info(deb_apt_alternate_content_source_href, opts = {})
597
+ if @api_client.config.debugging
598
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.read ...'
599
+ end
600
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
601
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
602
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.read"
603
+ end
604
+ # resource path
605
+ local_var_path = '{deb_apt_alternate_content_source_href}'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
606
+
607
+ # query parameters
608
+ query_params = opts[:query_params] || {}
609
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
610
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
611
+
612
+ # header parameters
613
+ header_params = opts[:header_params] || {}
614
+ # HTTP header 'Accept' (if needed)
615
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
616
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
617
+
618
+ # form parameters
619
+ form_params = opts[:form_params] || {}
620
+
621
+ # http body (model)
622
+ post_body = opts[:debug_body]
623
+
624
+ # return_type
625
+ return_type = opts[:debug_return_type] || 'DebAptAlternateContentSourceResponse'
626
+
627
+ # auth_names
628
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
629
+
630
+ new_options = opts.merge(
631
+ :operation => :"AcsDebApi.read",
632
+ :header_params => header_params,
633
+ :query_params => query_params,
634
+ :form_params => form_params,
635
+ :body => post_body,
636
+ :auth_names => auth_names,
637
+ :return_type => return_type
638
+ )
639
+
640
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
641
+ if @api_client.config.debugging
642
+ @api_client.config.logger.debug "API called: AcsDebApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
643
+ end
644
+ return data, status_code, headers
645
+ end
646
+
647
+ # Trigger an asynchronous task to create Alternate Content Source content.
648
+ # @param deb_apt_alternate_content_source_href [String]
649
+ # @param [Hash] opts the optional parameters
650
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
651
+ # @return [TaskGroupOperationResponse]
652
+ def refresh(deb_apt_alternate_content_source_href, opts = {})
653
+ data, _status_code, _headers = refresh_with_http_info(deb_apt_alternate_content_source_href, opts)
654
+ data
655
+ end
656
+
657
+ # Trigger an asynchronous task to create Alternate Content Source content.
658
+ # @param deb_apt_alternate_content_source_href [String]
659
+ # @param [Hash] opts the optional parameters
660
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
661
+ # @return [Array<(TaskGroupOperationResponse, Integer, Hash)>] TaskGroupOperationResponse data, response status code and response headers
662
+ def refresh_with_http_info(deb_apt_alternate_content_source_href, opts = {})
663
+ if @api_client.config.debugging
664
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.refresh ...'
665
+ end
666
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
667
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
668
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.refresh"
669
+ end
670
+ # resource path
671
+ local_var_path = '{deb_apt_alternate_content_source_href}refresh/'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
672
+
673
+ # query parameters
674
+ query_params = opts[:query_params] || {}
675
+
676
+ # header parameters
677
+ header_params = opts[:header_params] || {}
678
+ # HTTP header 'Accept' (if needed)
679
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
680
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
681
+
682
+ # form parameters
683
+ form_params = opts[:form_params] || {}
684
+
685
+ # http body (model)
686
+ post_body = opts[:debug_body]
687
+
688
+ # return_type
689
+ return_type = opts[:debug_return_type] || 'TaskGroupOperationResponse'
690
+
691
+ # auth_names
692
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
693
+
694
+ new_options = opts.merge(
695
+ :operation => :"AcsDebApi.refresh",
696
+ :header_params => header_params,
697
+ :query_params => query_params,
698
+ :form_params => form_params,
699
+ :body => post_body,
700
+ :auth_names => auth_names,
701
+ :return_type => return_type
702
+ )
703
+
704
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
705
+ if @api_client.config.debugging
706
+ @api_client.config.logger.debug "API called: AcsDebApi#refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
707
+ end
708
+ return data, status_code, headers
709
+ end
710
+
711
+ # Remove a role
712
+ # Remove a role for this object from users/groups.
713
+ # @param deb_apt_alternate_content_source_href [String]
714
+ # @param nested_role [NestedRole]
715
+ # @param [Hash] opts the optional parameters
716
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
717
+ # @return [NestedRoleResponse]
718
+ def remove_role(deb_apt_alternate_content_source_href, nested_role, opts = {})
719
+ data, _status_code, _headers = remove_role_with_http_info(deb_apt_alternate_content_source_href, nested_role, opts)
720
+ data
721
+ end
722
+
723
+ # Remove a role
724
+ # Remove a role for this object from users/groups.
725
+ # @param deb_apt_alternate_content_source_href [String]
726
+ # @param nested_role [NestedRole]
727
+ # @param [Hash] opts the optional parameters
728
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
729
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
730
+ def remove_role_with_http_info(deb_apt_alternate_content_source_href, nested_role, opts = {})
731
+ if @api_client.config.debugging
732
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.remove_role ...'
733
+ end
734
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
735
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
736
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.remove_role"
737
+ end
738
+ # verify the required parameter 'nested_role' is set
739
+ if @api_client.config.client_side_validation && nested_role.nil?
740
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling AcsDebApi.remove_role"
741
+ end
742
+ # resource path
743
+ local_var_path = '{deb_apt_alternate_content_source_href}remove_role/'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
744
+
745
+ # query parameters
746
+ query_params = opts[:query_params] || {}
747
+
748
+ # header parameters
749
+ header_params = opts[:header_params] || {}
750
+ # HTTP header 'Accept' (if needed)
751
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
752
+ # HTTP header 'Content-Type'
753
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
754
+ if !content_type.nil?
755
+ header_params['Content-Type'] = content_type
756
+ end
757
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
758
+
759
+ # form parameters
760
+ form_params = opts[:form_params] || {}
761
+
762
+ # http body (model)
763
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nested_role)
764
+
765
+ # return_type
766
+ return_type = opts[:debug_return_type] || 'NestedRoleResponse'
767
+
768
+ # auth_names
769
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
770
+
771
+ new_options = opts.merge(
772
+ :operation => :"AcsDebApi.remove_role",
773
+ :header_params => header_params,
774
+ :query_params => query_params,
775
+ :form_params => form_params,
776
+ :body => post_body,
777
+ :auth_names => auth_names,
778
+ :return_type => return_type
779
+ )
780
+
781
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
782
+ if @api_client.config.debugging
783
+ @api_client.config.logger.debug "API called: AcsDebApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
784
+ end
785
+ return data, status_code, headers
786
+ end
787
+
788
+ # Update an apt alternate content source
789
+ # Update the entity and trigger an asynchronous task if necessary
790
+ # @param deb_apt_alternate_content_source_href [String]
791
+ # @param deb_apt_alternate_content_source [DebAptAlternateContentSource]
792
+ # @param [Hash] opts the optional parameters
793
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
794
+ # @return [DebAptAlternateContentSourceResponse]
795
+ def update(deb_apt_alternate_content_source_href, deb_apt_alternate_content_source, opts = {})
796
+ data, _status_code, _headers = update_with_http_info(deb_apt_alternate_content_source_href, deb_apt_alternate_content_source, opts)
797
+ data
798
+ end
799
+
800
+ # Update an apt alternate content source
801
+ # Update the entity and trigger an asynchronous task if necessary
802
+ # @param deb_apt_alternate_content_source_href [String]
803
+ # @param deb_apt_alternate_content_source [DebAptAlternateContentSource]
804
+ # @param [Hash] opts the optional parameters
805
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
806
+ # @return [Array<(DebAptAlternateContentSourceResponse, Integer, Hash)>] DebAptAlternateContentSourceResponse data, response status code and response headers
807
+ def update_with_http_info(deb_apt_alternate_content_source_href, deb_apt_alternate_content_source, opts = {})
808
+ if @api_client.config.debugging
809
+ @api_client.config.logger.debug 'Calling API: AcsDebApi.update ...'
810
+ end
811
+ # verify the required parameter 'deb_apt_alternate_content_source_href' is set
812
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source_href.nil?
813
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source_href' when calling AcsDebApi.update"
814
+ end
815
+ # verify the required parameter 'deb_apt_alternate_content_source' is set
816
+ if @api_client.config.client_side_validation && deb_apt_alternate_content_source.nil?
817
+ fail ArgumentError, "Missing the required parameter 'deb_apt_alternate_content_source' when calling AcsDebApi.update"
818
+ end
819
+ # resource path
820
+ local_var_path = '{deb_apt_alternate_content_source_href}'.sub('{' + 'deb_apt_alternate_content_source_href' + '}', CGI.escape(deb_apt_alternate_content_source_href.to_s).gsub('%2F', '/'))
821
+
822
+ # query parameters
823
+ query_params = opts[:query_params] || {}
824
+
825
+ # header parameters
826
+ header_params = opts[:header_params] || {}
827
+ # HTTP header 'Accept' (if needed)
828
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
829
+ # HTTP header 'Content-Type'
830
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
831
+ if !content_type.nil?
832
+ header_params['Content-Type'] = content_type
833
+ end
834
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
835
+
836
+ # form parameters
837
+ form_params = opts[:form_params] || {}
838
+
839
+ # http body (model)
840
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(deb_apt_alternate_content_source)
841
+
842
+ # return_type
843
+ return_type = opts[:debug_return_type] || 'DebAptAlternateContentSourceResponse'
844
+
845
+ # auth_names
846
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
847
+
848
+ new_options = opts.merge(
849
+ :operation => :"AcsDebApi.update",
850
+ :header_params => header_params,
851
+ :query_params => query_params,
852
+ :form_params => form_params,
853
+ :body => post_body,
854
+ :auth_names => auth_names,
855
+ :return_type => return_type
856
+ )
857
+
858
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
859
+ if @api_client.config.debugging
860
+ @api_client.config.logger.debug "API called: AcsDebApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
861
+ end
862
+ return data, status_code, headers
863
+ end
864
+ end
865
+ end