pulpcore_client 3.20.0 → 3.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -84
  3. data/docs/ContentApi.md +1 -115
  4. data/docs/ContentguardsApi.md +1 -280
  5. data/docs/DistributionsApi.md +3 -281
  6. data/docs/PublicationsApi.md +0 -113
  7. data/docs/PulpImport.md +3 -1
  8. data/docs/RemotesApi.md +0 -280
  9. data/docs/RepositoriesApi.md +3 -281
  10. data/docs/UploadsApi.md +228 -0
  11. data/lib/pulpcore_client/api/content_api.rb +2 -134
  12. data/lib/pulpcore_client/api/contentguards_api.rb +2 -334
  13. data/lib/pulpcore_client/api/distributions_api.rb +5 -336
  14. data/lib/pulpcore_client/api/publications_api.rb +0 -128
  15. data/lib/pulpcore_client/api/remotes_api.rb +0 -334
  16. data/lib/pulpcore_client/api/repositories_api.rb +5 -336
  17. data/lib/pulpcore_client/api/repository_versions_api.rb +1 -1
  18. data/lib/pulpcore_client/api/uploads_api.rb +268 -0
  19. data/lib/pulpcore_client/api_client.rb +1 -1
  20. data/lib/pulpcore_client/models/pulp_import.rb +16 -4
  21. data/lib/pulpcore_client/version.rb +1 -1
  22. data/lib/pulpcore_client.rb +0 -31
  23. data/pulpcore_client.gemspec +3 -3
  24. data/spec/api/content_api_spec.rb +1 -27
  25. data/spec/api/contentguards_api_spec.rb +1 -65
  26. data/spec/api/distributions_api_spec.rb +2 -65
  27. data/spec/api/publications_api_spec.rb +0 -26
  28. data/spec/api/remotes_api_spec.rb +0 -64
  29. data/spec/api/repositories_api_spec.rb +2 -65
  30. data/spec/api/uploads_api_spec.rb +50 -0
  31. data/spec/models/pulp_import_spec.rb +6 -0
  32. metadata +136 -261
  33. data/docs/AcsApi.md +0 -417
  34. data/docs/AlternateContentSource.md +0 -23
  35. data/docs/AlternateContentSourceResponse.md +0 -27
  36. data/docs/ContentGuard.md +0 -19
  37. data/docs/Distribution.md +0 -25
  38. data/docs/Export.md +0 -17
  39. data/docs/ExportResponse.md +0 -25
  40. data/docs/Exporter.md +0 -17
  41. data/docs/ExporterResponse.md +0 -21
  42. data/docs/ExportersApi.md +0 -362
  43. data/docs/ExportersExportsApi.md +0 -241
  44. data/docs/Import.md +0 -19
  45. data/docs/Importer.md +0 -17
  46. data/docs/ImporterResponse.md +0 -21
  47. data/docs/ImportersApi.md +0 -361
  48. data/docs/ImportersImportsApi.md +0 -241
  49. data/docs/MultipleArtifactContent.md +0 -17
  50. data/docs/PaginatedAlternateContentSourceResponseList.md +0 -23
  51. data/docs/PaginatedExportResponseList.md +0 -23
  52. data/docs/PaginatedExporterResponseList.md +0 -23
  53. data/docs/PaginatedImporterResponseList.md +0 -23
  54. data/docs/PatchedAlternateContentSource.md +0 -23
  55. data/docs/PatchedContentGuard.md +0 -19
  56. data/docs/PatchedDistribution.md +0 -25
  57. data/docs/PatchedExporter.md +0 -17
  58. data/docs/PatchedImporter.md +0 -17
  59. data/docs/PatchedRemote.md +0 -57
  60. data/docs/PatchedRepository.md +0 -25
  61. data/docs/Remote.md +0 -57
  62. data/docs/RepositoriesVersionsApi.md +0 -271
  63. data/docs/Repository.md +0 -25
  64. data/git_push.sh +0 -58
  65. data/lib/pulpcore_client/api/acs_api.rb +0 -514
  66. data/lib/pulpcore_client/api/exporters_api.rb +0 -446
  67. data/lib/pulpcore_client/api/exporters_exports_api.rb +0 -294
  68. data/lib/pulpcore_client/api/importers_api.rb +0 -444
  69. data/lib/pulpcore_client/api/importers_imports_api.rb +0 -294
  70. data/lib/pulpcore_client/api/repositories_versions_api.rb +0 -343
  71. data/lib/pulpcore_client/models/alternate_content_source.rb +0 -270
  72. data/lib/pulpcore_client/models/alternate_content_source_response.rb +0 -270
  73. data/lib/pulpcore_client/models/content_guard.rb +0 -258
  74. data/lib/pulpcore_client/models/distribution.rb +0 -297
  75. data/lib/pulpcore_client/models/export.rb +0 -209
  76. data/lib/pulpcore_client/models/export_response.rb +0 -250
  77. data/lib/pulpcore_client/models/exporter.rb +0 -232
  78. data/lib/pulpcore_client/models/exporter_response.rb +0 -232
  79. data/lib/pulpcore_client/models/import.rb +0 -228
  80. data/lib/pulpcore_client/models/importer.rb +0 -232
  81. data/lib/pulpcore_client/models/importer_response.rb +0 -232
  82. data/lib/pulpcore_client/models/multiple_artifact_content.rb +0 -213
  83. data/lib/pulpcore_client/models/paginated_alternate_content_source_response_list.rb +0 -237
  84. data/lib/pulpcore_client/models/paginated_export_response_list.rb +0 -237
  85. data/lib/pulpcore_client/models/paginated_exporter_response_list.rb +0 -237
  86. data/lib/pulpcore_client/models/paginated_importer_response_list.rb +0 -237
  87. data/lib/pulpcore_client/models/patched_alternate_content_source.rb +0 -256
  88. data/lib/pulpcore_client/models/patched_content_guard.rb +0 -249
  89. data/lib/pulpcore_client/models/patched_distribution.rb +0 -279
  90. data/lib/pulpcore_client/models/patched_exporter.rb +0 -223
  91. data/lib/pulpcore_client/models/patched_importer.rb +0 -223
  92. data/lib/pulpcore_client/models/patched_remote.rb +0 -649
  93. data/lib/pulpcore_client/models/patched_repository.rb +0 -295
  94. data/lib/pulpcore_client/models/remote.rb +0 -667
  95. data/lib/pulpcore_client/models/repository.rb +0 -304
  96. data/spec/api/acs_api_spec.rb +0 -132
  97. data/spec/api/exporters_api_spec.rb +0 -120
  98. data/spec/api/exporters_exports_api_spec.rb +0 -90
  99. data/spec/api/importers_api_spec.rb +0 -120
  100. data/spec/api/importers_imports_api_spec.rb +0 -90
  101. data/spec/api/repositories_versions_api_spec.rb +0 -104
  102. data/spec/models/alternate_content_source_response_spec.rb +0 -71
  103. data/spec/models/alternate_content_source_spec.rb +0 -59
  104. data/spec/models/content_guard_spec.rb +0 -47
  105. data/spec/models/distribution_spec.rb +0 -65
  106. data/spec/models/export_response_spec.rb +0 -65
  107. data/spec/models/export_spec.rb +0 -41
  108. data/spec/models/exporter_response_spec.rb +0 -53
  109. data/spec/models/exporter_spec.rb +0 -41
  110. data/spec/models/import_spec.rb +0 -47
  111. data/spec/models/importer_response_spec.rb +0 -53
  112. data/spec/models/importer_spec.rb +0 -41
  113. data/spec/models/multiple_artifact_content_spec.rb +0 -41
  114. data/spec/models/paginated_alternate_content_source_response_list_spec.rb +0 -59
  115. data/spec/models/paginated_export_response_list_spec.rb +0 -59
  116. data/spec/models/paginated_exporter_response_list_spec.rb +0 -59
  117. data/spec/models/paginated_importer_response_list_spec.rb +0 -59
  118. data/spec/models/patched_alternate_content_source_spec.rb +0 -59
  119. data/spec/models/patched_content_guard_spec.rb +0 -47
  120. data/spec/models/patched_distribution_spec.rb +0 -65
  121. data/spec/models/patched_exporter_spec.rb +0 -41
  122. data/spec/models/patched_importer_spec.rb +0 -41
  123. data/spec/models/patched_remote_spec.rb +0 -161
  124. data/spec/models/patched_repository_spec.rb +0 -65
  125. data/spec/models/remote_spec.rb +0 -161
  126. data/spec/models/repository_spec.rb +0 -65
@@ -1,444 +0,0 @@
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
- OpenAPI Generator version: 4.3.1
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module PulpcoreClient
16
- class ImportersApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create an importer
23
- # ViewSet for Importers.
24
- # @param importer [Importer]
25
- # @param [Hash] opts the optional parameters
26
- # @return [ImporterResponse]
27
- def create(importer, opts = {})
28
- data, _status_code, _headers = create_with_http_info(importer, opts)
29
- data
30
- end
31
-
32
- # Create an importer
33
- # ViewSet for Importers.
34
- # @param importer [Importer]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(ImporterResponse, Integer, Hash)>] ImporterResponse data, response status code and response headers
37
- def create_with_http_info(importer, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: ImportersApi.create ...'
40
- end
41
- # verify the required parameter 'importer' is set
42
- if @api_client.config.client_side_validation && importer.nil?
43
- fail ArgumentError, "Missing the required parameter 'importer' when calling ImportersApi.create"
44
- end
45
- # resource path
46
- local_var_path = '/pulp/api/v3/importers/'
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
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(importer)
63
-
64
- # return_type
65
- return_type = opts[:return_type] || 'ImporterResponse'
66
-
67
- # auth_names
68
- auth_names = opts[:auth_names] || ['basicAuth']
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: ImportersApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
- # Delete an importer
87
- # ViewSet for Importers.
88
- # @param importer_href [String]
89
- # @param [Hash] opts the optional parameters
90
- # @return [nil]
91
- def delete(importer_href, opts = {})
92
- delete_with_http_info(importer_href, opts)
93
- nil
94
- end
95
-
96
- # Delete an importer
97
- # ViewSet for Importers.
98
- # @param importer_href [String]
99
- # @param [Hash] opts the optional parameters
100
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
- def delete_with_http_info(importer_href, opts = {})
102
- if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: ImportersApi.delete ...'
104
- end
105
- # verify the required parameter 'importer_href' is set
106
- if @api_client.config.client_side_validation && importer_href.nil?
107
- fail ArgumentError, "Missing the required parameter 'importer_href' when calling ImportersApi.delete"
108
- end
109
- # resource path
110
- local_var_path = '{importer_href}'.sub('{' + 'importer_href' + '}', CGI.escape(importer_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
-
118
- # form parameters
119
- form_params = opts[:form_params] || {}
120
-
121
- # http body (model)
122
- post_body = opts[:body]
123
-
124
- # return_type
125
- return_type = opts[:return_type]
126
-
127
- # auth_names
128
- auth_names = opts[:auth_names] || ['basicAuth']
129
-
130
- new_options = opts.merge(
131
- :header_params => header_params,
132
- :query_params => query_params,
133
- :form_params => form_params,
134
- :body => post_body,
135
- :auth_names => auth_names,
136
- :return_type => return_type
137
- )
138
-
139
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
140
- if @api_client.config.debugging
141
- @api_client.config.logger.debug "API called: ImportersApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
- end
143
- return data, status_code, headers
144
- end
145
-
146
- # List importers
147
- # ViewSet for Importers.
148
- # @param [Hash] opts the optional parameters
149
- # @option opts [Integer] :limit Number of results to return per page.
150
- # @option opts [String] :name
151
- # @option opts [String] :name__contains Filter results where name contains value
152
- # @option opts [String] :name__icontains Filter results where name contains value
153
- # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
154
- # @option opts [String] :name__startswith Filter results where name starts with value
155
- # @option opts [Integer] :offset The initial index from which to return the results.
156
- # @option opts [Array<String>] :ordering Ordering
157
- # @option opts [String] :fields A list of fields to include in the response.
158
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
159
- # @return [PaginatedImporterResponseList]
160
- def list(opts = {})
161
- data, _status_code, _headers = list_with_http_info(opts)
162
- data
163
- end
164
-
165
- # List importers
166
- # ViewSet for Importers.
167
- # @param [Hash] opts the optional parameters
168
- # @option opts [Integer] :limit Number of results to return per page.
169
- # @option opts [String] :name
170
- # @option opts [String] :name__contains Filter results where name contains value
171
- # @option opts [String] :name__icontains Filter results where name contains value
172
- # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
173
- # @option opts [String] :name__startswith Filter results where name starts with value
174
- # @option opts [Integer] :offset The initial index from which to return the results.
175
- # @option opts [Array<String>] :ordering Ordering
176
- # @option opts [String] :fields A list of fields to include in the response.
177
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
178
- # @return [Array<(PaginatedImporterResponseList, Integer, Hash)>] PaginatedImporterResponseList 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: ImportersApi.list ...'
182
- end
183
- allowable_values = ["-core_pulp_importer", "-group_roles", "-import", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-user_roles", "core_pulp_importer", "group_roles", "import", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "user_roles"]
184
- if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
185
- fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
186
- end
187
- # resource path
188
- local_var_path = '/pulp/api/v3/importers/'
189
-
190
- # query parameters
191
- query_params = opts[:query_params] || {}
192
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
193
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
194
- query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
195
- query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
196
- query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
197
- query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
198
- query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
199
- query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
200
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
201
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
202
-
203
- # header parameters
204
- header_params = opts[:header_params] || {}
205
- # HTTP header 'Accept' (if needed)
206
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
-
208
- # form parameters
209
- form_params = opts[:form_params] || {}
210
-
211
- # http body (model)
212
- post_body = opts[:body]
213
-
214
- # return_type
215
- return_type = opts[:return_type] || 'PaginatedImporterResponseList'
216
-
217
- # auth_names
218
- auth_names = opts[:auth_names] || ['basicAuth']
219
-
220
- new_options = opts.merge(
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(:GET, local_var_path, new_options)
230
- if @api_client.config.debugging
231
- @api_client.config.logger.debug "API called: ImportersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
232
- end
233
- return data, status_code, headers
234
- end
235
-
236
- # Update an importer
237
- # ViewSet for Importers.
238
- # @param importer_href [String]
239
- # @param patched_importer [PatchedImporter]
240
- # @param [Hash] opts the optional parameters
241
- # @return [ImporterResponse]
242
- def partial_update(importer_href, patched_importer, opts = {})
243
- data, _status_code, _headers = partial_update_with_http_info(importer_href, patched_importer, opts)
244
- data
245
- end
246
-
247
- # Update an importer
248
- # ViewSet for Importers.
249
- # @param importer_href [String]
250
- # @param patched_importer [PatchedImporter]
251
- # @param [Hash] opts the optional parameters
252
- # @return [Array<(ImporterResponse, Integer, Hash)>] ImporterResponse data, response status code and response headers
253
- def partial_update_with_http_info(importer_href, patched_importer, opts = {})
254
- if @api_client.config.debugging
255
- @api_client.config.logger.debug 'Calling API: ImportersApi.partial_update ...'
256
- end
257
- # verify the required parameter 'importer_href' is set
258
- if @api_client.config.client_side_validation && importer_href.nil?
259
- fail ArgumentError, "Missing the required parameter 'importer_href' when calling ImportersApi.partial_update"
260
- end
261
- # verify the required parameter 'patched_importer' is set
262
- if @api_client.config.client_side_validation && patched_importer.nil?
263
- fail ArgumentError, "Missing the required parameter 'patched_importer' when calling ImportersApi.partial_update"
264
- end
265
- # resource path
266
- local_var_path = '{importer_href}'.sub('{' + 'importer_href' + '}', CGI.escape(importer_href.to_s).gsub('%2F', '/'))
267
-
268
- # query parameters
269
- query_params = opts[:query_params] || {}
270
-
271
- # header parameters
272
- header_params = opts[:header_params] || {}
273
- # HTTP header 'Accept' (if needed)
274
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
275
- # HTTP header 'Content-Type'
276
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
277
-
278
- # form parameters
279
- form_params = opts[:form_params] || {}
280
-
281
- # http body (model)
282
- post_body = opts[:body] || @api_client.object_to_http_body(patched_importer)
283
-
284
- # return_type
285
- return_type = opts[:return_type] || 'ImporterResponse'
286
-
287
- # auth_names
288
- auth_names = opts[:auth_names] || ['basicAuth']
289
-
290
- new_options = opts.merge(
291
- :header_params => header_params,
292
- :query_params => query_params,
293
- :form_params => form_params,
294
- :body => post_body,
295
- :auth_names => auth_names,
296
- :return_type => return_type
297
- )
298
-
299
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
300
- if @api_client.config.debugging
301
- @api_client.config.logger.debug "API called: ImportersApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
- end
303
- return data, status_code, headers
304
- end
305
-
306
- # Inspect an importer
307
- # ViewSet for Importers.
308
- # @param importer_href [String]
309
- # @param [Hash] opts the optional parameters
310
- # @option opts [String] :fields A list of fields to include in the response.
311
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
312
- # @return [ImporterResponse]
313
- def read(importer_href, opts = {})
314
- data, _status_code, _headers = read_with_http_info(importer_href, opts)
315
- data
316
- end
317
-
318
- # Inspect an importer
319
- # ViewSet for Importers.
320
- # @param importer_href [String]
321
- # @param [Hash] opts the optional parameters
322
- # @option opts [String] :fields A list of fields to include in the response.
323
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
324
- # @return [Array<(ImporterResponse, Integer, Hash)>] ImporterResponse data, response status code and response headers
325
- def read_with_http_info(importer_href, opts = {})
326
- if @api_client.config.debugging
327
- @api_client.config.logger.debug 'Calling API: ImportersApi.read ...'
328
- end
329
- # verify the required parameter 'importer_href' is set
330
- if @api_client.config.client_side_validation && importer_href.nil?
331
- fail ArgumentError, "Missing the required parameter 'importer_href' when calling ImportersApi.read"
332
- end
333
- # resource path
334
- local_var_path = '{importer_href}'.sub('{' + 'importer_href' + '}', CGI.escape(importer_href.to_s).gsub('%2F', '/'))
335
-
336
- # query parameters
337
- query_params = opts[:query_params] || {}
338
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
339
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
340
-
341
- # header parameters
342
- header_params = opts[:header_params] || {}
343
- # HTTP header 'Accept' (if needed)
344
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
345
-
346
- # form parameters
347
- form_params = opts[:form_params] || {}
348
-
349
- # http body (model)
350
- post_body = opts[:body]
351
-
352
- # return_type
353
- return_type = opts[:return_type] || 'ImporterResponse'
354
-
355
- # auth_names
356
- auth_names = opts[:auth_names] || ['basicAuth']
357
-
358
- new_options = opts.merge(
359
- :header_params => header_params,
360
- :query_params => query_params,
361
- :form_params => form_params,
362
- :body => post_body,
363
- :auth_names => auth_names,
364
- :return_type => return_type
365
- )
366
-
367
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
- if @api_client.config.debugging
369
- @api_client.config.logger.debug "API called: ImportersApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
- end
371
- return data, status_code, headers
372
- end
373
-
374
- # Update an importer
375
- # ViewSet for Importers.
376
- # @param importer_href [String]
377
- # @param importer [Importer]
378
- # @param [Hash] opts the optional parameters
379
- # @return [ImporterResponse]
380
- def update(importer_href, importer, opts = {})
381
- data, _status_code, _headers = update_with_http_info(importer_href, importer, opts)
382
- data
383
- end
384
-
385
- # Update an importer
386
- # ViewSet for Importers.
387
- # @param importer_href [String]
388
- # @param importer [Importer]
389
- # @param [Hash] opts the optional parameters
390
- # @return [Array<(ImporterResponse, Integer, Hash)>] ImporterResponse data, response status code and response headers
391
- def update_with_http_info(importer_href, importer, opts = {})
392
- if @api_client.config.debugging
393
- @api_client.config.logger.debug 'Calling API: ImportersApi.update ...'
394
- end
395
- # verify the required parameter 'importer_href' is set
396
- if @api_client.config.client_side_validation && importer_href.nil?
397
- fail ArgumentError, "Missing the required parameter 'importer_href' when calling ImportersApi.update"
398
- end
399
- # verify the required parameter 'importer' is set
400
- if @api_client.config.client_side_validation && importer.nil?
401
- fail ArgumentError, "Missing the required parameter 'importer' when calling ImportersApi.update"
402
- end
403
- # resource path
404
- local_var_path = '{importer_href}'.sub('{' + 'importer_href' + '}', CGI.escape(importer_href.to_s).gsub('%2F', '/'))
405
-
406
- # query parameters
407
- query_params = opts[:query_params] || {}
408
-
409
- # header parameters
410
- header_params = opts[:header_params] || {}
411
- # HTTP header 'Accept' (if needed)
412
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
413
- # HTTP header 'Content-Type'
414
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
415
-
416
- # form parameters
417
- form_params = opts[:form_params] || {}
418
-
419
- # http body (model)
420
- post_body = opts[:body] || @api_client.object_to_http_body(importer)
421
-
422
- # return_type
423
- return_type = opts[:return_type] || 'ImporterResponse'
424
-
425
- # auth_names
426
- auth_names = opts[:auth_names] || ['basicAuth']
427
-
428
- new_options = opts.merge(
429
- :header_params => header_params,
430
- :query_params => query_params,
431
- :form_params => form_params,
432
- :body => post_body,
433
- :auth_names => auth_names,
434
- :return_type => return_type
435
- )
436
-
437
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
438
- if @api_client.config.debugging
439
- @api_client.config.logger.debug "API called: ImportersApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
- end
441
- return data, status_code, headers
442
- end
443
- end
444
- end