pulp_file_client 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -21
- data/docs/FileFileRepository.md +2 -0
- data/docs/FileFileRepositoryResponse.md +2 -0
- data/docs/PatchedfileFileRepository.md +2 -0
- data/docs/PublicationsFileApi.md +4 -0
- data/docs/RepositoryVersionResponse.md +2 -0
- data/lib/pulp_file_client/api/publications_file_api.rb +6 -0
- data/lib/pulp_file_client/models/file_file_repository.rb +27 -1
- data/lib/pulp_file_client/models/file_file_repository_response.rb +27 -1
- data/lib/pulp_file_client/models/patchedfile_file_repository.rb +27 -1
- data/lib/pulp_file_client/models/repository_version_response.rb +10 -1
- data/lib/pulp_file_client/version.rb +1 -1
- data/lib/pulp_file_client.rb +0 -9
- data/spec/api/publications_file_api_spec.rb +2 -0
- data/spec/models/file_file_repository_response_spec.rb +6 -0
- data/spec/models/file_file_repository_spec.rb +6 -0
- data/spec/models/patchedfile_file_repository_spec.rb +6 -0
- data/spec/models/repository_version_response_spec.rb +6 -0
- metadata +21 -57
- data/docs/ExportResponse.md +0 -25
- data/docs/ExportersFileExportsApi.md +0 -243
- data/docs/ExportersFilesystemApi.md +0 -362
- data/docs/FileFileFilesystemExporter.md +0 -19
- data/docs/FileFileFilesystemExporterResponse.md +0 -23
- data/docs/PaginatedExportResponseList.md +0 -23
- data/docs/PaginatedfileFileFilesystemExporterResponseList.md +0 -23
- data/docs/PatchedfileFileFilesystemExporter.md +0 -19
- data/docs/PublicationExport.md +0 -17
- data/lib/pulp_file_client/api/exporters_file_exports_api.rb +0 -297
- data/lib/pulp_file_client/api/exporters_filesystem_api.rb +0 -442
- data/lib/pulp_file_client/models/export_response.rb +0 -250
- data/lib/pulp_file_client/models/file_file_filesystem_exporter.rb +0 -228
- data/lib/pulp_file_client/models/file_file_filesystem_exporter_response.rb +0 -247
- data/lib/pulp_file_client/models/paginated_export_response_list.rb +0 -237
- data/lib/pulp_file_client/models/paginatedfile_file_filesystem_exporter_response_list.rb +0 -237
- data/lib/pulp_file_client/models/patchedfile_file_filesystem_exporter.rb +0 -218
- data/lib/pulp_file_client/models/publication_export.rb +0 -213
- data/spec/api/exporters_file_exports_api_spec.rb +0 -91
- data/spec/api/exporters_filesystem_api_spec.rb +0 -120
- data/spec/models/export_response_spec.rb +0 -65
- data/spec/models/file_file_filesystem_exporter_response_spec.rb +0 -59
- data/spec/models/file_file_filesystem_exporter_spec.rb +0 -47
- data/spec/models/paginated_export_response_list_spec.rb +0 -59
- data/spec/models/paginatedfile_file_filesystem_exporter_response_list_spec.rb +0 -59
- data/spec/models/patchedfile_file_filesystem_exporter_spec.rb +0 -47
- data/spec/models/publication_export_spec.rb +0 -41
@@ -1,442 +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.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module PulpFileClient
|
16
|
-
class ExportersFilesystemApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Create a file filesystem exporter
|
23
|
-
# FilesystemExporters export content from a publication to a path on the file system. WARNING: This feature is provided as a tech preview and may change in the future. Backwards compatibility is not guaranteed.
|
24
|
-
# @param file_file_filesystem_exporter [FileFileFilesystemExporter]
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [FileFileFilesystemExporterResponse]
|
27
|
-
def create(file_file_filesystem_exporter, opts = {})
|
28
|
-
data, _status_code, _headers = create_with_http_info(file_file_filesystem_exporter, opts)
|
29
|
-
data
|
30
|
-
end
|
31
|
-
|
32
|
-
# Create a file filesystem exporter
|
33
|
-
# FilesystemExporters export content from a publication to a path on the file system. WARNING: This feature is provided as a tech preview and may change in the future. Backwards compatibility is not guaranteed.
|
34
|
-
# @param file_file_filesystem_exporter [FileFileFilesystemExporter]
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(FileFileFilesystemExporterResponse, Integer, Hash)>] FileFileFilesystemExporterResponse data, response status code and response headers
|
37
|
-
def create_with_http_info(file_file_filesystem_exporter, opts = {})
|
38
|
-
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug 'Calling API: ExportersFilesystemApi.create ...'
|
40
|
-
end
|
41
|
-
# verify the required parameter 'file_file_filesystem_exporter' is set
|
42
|
-
if @api_client.config.client_side_validation && file_file_filesystem_exporter.nil?
|
43
|
-
fail ArgumentError, "Missing the required parameter 'file_file_filesystem_exporter' when calling ExportersFilesystemApi.create"
|
44
|
-
end
|
45
|
-
# resource path
|
46
|
-
local_var_path = '/pulp/api/v3/exporters/file/filesystem/'
|
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(file_file_filesystem_exporter)
|
63
|
-
|
64
|
-
# return_type
|
65
|
-
return_type = opts[:return_type] || 'FileFileFilesystemExporterResponse'
|
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: ExportersFilesystemApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
-
end
|
83
|
-
return data, status_code, headers
|
84
|
-
end
|
85
|
-
|
86
|
-
# Delete a file filesystem exporter
|
87
|
-
# Trigger an asynchronous delete task
|
88
|
-
# @param file_file_filesystem_exporter_href [String]
|
89
|
-
# @param [Hash] opts the optional parameters
|
90
|
-
# @return [AsyncOperationResponse]
|
91
|
-
def delete(file_file_filesystem_exporter_href, opts = {})
|
92
|
-
data, _status_code, _headers = delete_with_http_info(file_file_filesystem_exporter_href, opts)
|
93
|
-
data
|
94
|
-
end
|
95
|
-
|
96
|
-
# Delete a file filesystem exporter
|
97
|
-
# Trigger an asynchronous delete task
|
98
|
-
# @param file_file_filesystem_exporter_href [String]
|
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(file_file_filesystem_exporter_href, opts = {})
|
102
|
-
if @api_client.config.debugging
|
103
|
-
@api_client.config.logger.debug 'Calling API: ExportersFilesystemApi.delete ...'
|
104
|
-
end
|
105
|
-
# verify the required parameter 'file_file_filesystem_exporter_href' is set
|
106
|
-
if @api_client.config.client_side_validation && file_file_filesystem_exporter_href.nil?
|
107
|
-
fail ArgumentError, "Missing the required parameter 'file_file_filesystem_exporter_href' when calling ExportersFilesystemApi.delete"
|
108
|
-
end
|
109
|
-
# resource path
|
110
|
-
local_var_path = '{file_file_filesystem_exporter_href}'.sub('{' + 'file_file_filesystem_exporter_href' + '}', CGI.escape(file_file_filesystem_exporter_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] || ['basicAuth']
|
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: ExportersFilesystemApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
-
end
|
145
|
-
return data, status_code, headers
|
146
|
-
end
|
147
|
-
|
148
|
-
# List file filesystem exporters
|
149
|
-
# FilesystemExporters export content from a publication to a path on the file system. WARNING: This feature is provided as a tech preview and may change in the future. Backwards compatibility is not guaranteed.
|
150
|
-
# @param [Hash] opts the optional parameters
|
151
|
-
# @option opts [Integer] :limit Number of results to return per page.
|
152
|
-
# @option opts [String] :name
|
153
|
-
# @option opts [String] :name__contains Filter results where name contains value
|
154
|
-
# @option opts [String] :name__icontains Filter results where name contains value
|
155
|
-
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
156
|
-
# @option opts [String] :name__startswith Filter results where name starts with value
|
157
|
-
# @option opts [Integer] :offset The initial index from which to return the results.
|
158
|
-
# @option opts [String] :ordering Which field to use when ordering the results.
|
159
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
160
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
161
|
-
# @return [PaginatedfileFileFilesystemExporterResponseList]
|
162
|
-
def list(opts = {})
|
163
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
164
|
-
data
|
165
|
-
end
|
166
|
-
|
167
|
-
# List file filesystem exporters
|
168
|
-
# FilesystemExporters export content from a publication to a path on the file system. WARNING: This feature is provided as a tech preview and may change in the future. Backwards compatibility is not guaranteed.
|
169
|
-
# @param [Hash] opts the optional parameters
|
170
|
-
# @option opts [Integer] :limit Number of results to return per page.
|
171
|
-
# @option opts [String] :name
|
172
|
-
# @option opts [String] :name__contains Filter results where name contains value
|
173
|
-
# @option opts [String] :name__icontains Filter results where name contains value
|
174
|
-
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
175
|
-
# @option opts [String] :name__startswith Filter results where name starts with value
|
176
|
-
# @option opts [Integer] :offset The initial index from which to return the results.
|
177
|
-
# @option opts [String] :ordering Which field to use when ordering the results.
|
178
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
179
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
180
|
-
# @return [Array<(PaginatedfileFileFilesystemExporterResponseList, Integer, Hash)>] PaginatedfileFileFilesystemExporterResponseList data, response status code and response headers
|
181
|
-
def list_with_http_info(opts = {})
|
182
|
-
if @api_client.config.debugging
|
183
|
-
@api_client.config.logger.debug 'Calling API: ExportersFilesystemApi.list ...'
|
184
|
-
end
|
185
|
-
# resource path
|
186
|
-
local_var_path = '/pulp/api/v3/exporters/file/filesystem/'
|
187
|
-
|
188
|
-
# query parameters
|
189
|
-
query_params = opts[:query_params] || {}
|
190
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
191
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
192
|
-
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
193
|
-
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
194
|
-
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
195
|
-
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
196
|
-
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
197
|
-
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
198
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
199
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
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'])
|
205
|
-
|
206
|
-
# form parameters
|
207
|
-
form_params = opts[:form_params] || {}
|
208
|
-
|
209
|
-
# http body (model)
|
210
|
-
post_body = opts[:body]
|
211
|
-
|
212
|
-
# return_type
|
213
|
-
return_type = opts[:return_type] || 'PaginatedfileFileFilesystemExporterResponseList'
|
214
|
-
|
215
|
-
# auth_names
|
216
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
217
|
-
|
218
|
-
new_options = opts.merge(
|
219
|
-
:header_params => header_params,
|
220
|
-
:query_params => query_params,
|
221
|
-
:form_params => form_params,
|
222
|
-
:body => post_body,
|
223
|
-
:auth_names => auth_names,
|
224
|
-
:return_type => return_type
|
225
|
-
)
|
226
|
-
|
227
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
228
|
-
if @api_client.config.debugging
|
229
|
-
@api_client.config.logger.debug "API called: ExportersFilesystemApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
230
|
-
end
|
231
|
-
return data, status_code, headers
|
232
|
-
end
|
233
|
-
|
234
|
-
# Update a file filesystem exporter
|
235
|
-
# Trigger an asynchronous partial update task
|
236
|
-
# @param file_file_filesystem_exporter_href [String]
|
237
|
-
# @param patchedfile_file_filesystem_exporter [PatchedfileFileFilesystemExporter]
|
238
|
-
# @param [Hash] opts the optional parameters
|
239
|
-
# @return [AsyncOperationResponse]
|
240
|
-
def partial_update(file_file_filesystem_exporter_href, patchedfile_file_filesystem_exporter, opts = {})
|
241
|
-
data, _status_code, _headers = partial_update_with_http_info(file_file_filesystem_exporter_href, patchedfile_file_filesystem_exporter, opts)
|
242
|
-
data
|
243
|
-
end
|
244
|
-
|
245
|
-
# Update a file filesystem exporter
|
246
|
-
# Trigger an asynchronous partial update task
|
247
|
-
# @param file_file_filesystem_exporter_href [String]
|
248
|
-
# @param patchedfile_file_filesystem_exporter [PatchedfileFileFilesystemExporter]
|
249
|
-
# @param [Hash] opts the optional parameters
|
250
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
251
|
-
def partial_update_with_http_info(file_file_filesystem_exporter_href, patchedfile_file_filesystem_exporter, opts = {})
|
252
|
-
if @api_client.config.debugging
|
253
|
-
@api_client.config.logger.debug 'Calling API: ExportersFilesystemApi.partial_update ...'
|
254
|
-
end
|
255
|
-
# verify the required parameter 'file_file_filesystem_exporter_href' is set
|
256
|
-
if @api_client.config.client_side_validation && file_file_filesystem_exporter_href.nil?
|
257
|
-
fail ArgumentError, "Missing the required parameter 'file_file_filesystem_exporter_href' when calling ExportersFilesystemApi.partial_update"
|
258
|
-
end
|
259
|
-
# verify the required parameter 'patchedfile_file_filesystem_exporter' is set
|
260
|
-
if @api_client.config.client_side_validation && patchedfile_file_filesystem_exporter.nil?
|
261
|
-
fail ArgumentError, "Missing the required parameter 'patchedfile_file_filesystem_exporter' when calling ExportersFilesystemApi.partial_update"
|
262
|
-
end
|
263
|
-
# resource path
|
264
|
-
local_var_path = '{file_file_filesystem_exporter_href}'.sub('{' + 'file_file_filesystem_exporter_href' + '}', CGI.escape(file_file_filesystem_exporter_href.to_s).gsub('%2F', '/'))
|
265
|
-
|
266
|
-
# query parameters
|
267
|
-
query_params = opts[:query_params] || {}
|
268
|
-
|
269
|
-
# header parameters
|
270
|
-
header_params = opts[:header_params] || {}
|
271
|
-
# HTTP header 'Accept' (if needed)
|
272
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
273
|
-
# HTTP header 'Content-Type'
|
274
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
275
|
-
|
276
|
-
# form parameters
|
277
|
-
form_params = opts[:form_params] || {}
|
278
|
-
|
279
|
-
# http body (model)
|
280
|
-
post_body = opts[:body] || @api_client.object_to_http_body(patchedfile_file_filesystem_exporter)
|
281
|
-
|
282
|
-
# return_type
|
283
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
284
|
-
|
285
|
-
# auth_names
|
286
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
287
|
-
|
288
|
-
new_options = opts.merge(
|
289
|
-
:header_params => header_params,
|
290
|
-
:query_params => query_params,
|
291
|
-
:form_params => form_params,
|
292
|
-
:body => post_body,
|
293
|
-
:auth_names => auth_names,
|
294
|
-
:return_type => return_type
|
295
|
-
)
|
296
|
-
|
297
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
298
|
-
if @api_client.config.debugging
|
299
|
-
@api_client.config.logger.debug "API called: ExportersFilesystemApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
-
end
|
301
|
-
return data, status_code, headers
|
302
|
-
end
|
303
|
-
|
304
|
-
# Inspect a file filesystem exporter
|
305
|
-
# FilesystemExporters export content from a publication to a path on the file system. WARNING: This feature is provided as a tech preview and may change in the future. Backwards compatibility is not guaranteed.
|
306
|
-
# @param file_file_filesystem_exporter_href [String]
|
307
|
-
# @param [Hash] opts the optional parameters
|
308
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
309
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
310
|
-
# @return [FileFileFilesystemExporterResponse]
|
311
|
-
def read(file_file_filesystem_exporter_href, opts = {})
|
312
|
-
data, _status_code, _headers = read_with_http_info(file_file_filesystem_exporter_href, opts)
|
313
|
-
data
|
314
|
-
end
|
315
|
-
|
316
|
-
# Inspect a file filesystem exporter
|
317
|
-
# FilesystemExporters export content from a publication to a path on the file system. WARNING: This feature is provided as a tech preview and may change in the future. Backwards compatibility is not guaranteed.
|
318
|
-
# @param file_file_filesystem_exporter_href [String]
|
319
|
-
# @param [Hash] opts the optional parameters
|
320
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
321
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
322
|
-
# @return [Array<(FileFileFilesystemExporterResponse, Integer, Hash)>] FileFileFilesystemExporterResponse data, response status code and response headers
|
323
|
-
def read_with_http_info(file_file_filesystem_exporter_href, opts = {})
|
324
|
-
if @api_client.config.debugging
|
325
|
-
@api_client.config.logger.debug 'Calling API: ExportersFilesystemApi.read ...'
|
326
|
-
end
|
327
|
-
# verify the required parameter 'file_file_filesystem_exporter_href' is set
|
328
|
-
if @api_client.config.client_side_validation && file_file_filesystem_exporter_href.nil?
|
329
|
-
fail ArgumentError, "Missing the required parameter 'file_file_filesystem_exporter_href' when calling ExportersFilesystemApi.read"
|
330
|
-
end
|
331
|
-
# resource path
|
332
|
-
local_var_path = '{file_file_filesystem_exporter_href}'.sub('{' + 'file_file_filesystem_exporter_href' + '}', CGI.escape(file_file_filesystem_exporter_href.to_s).gsub('%2F', '/'))
|
333
|
-
|
334
|
-
# query parameters
|
335
|
-
query_params = opts[:query_params] || {}
|
336
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
337
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
338
|
-
|
339
|
-
# header parameters
|
340
|
-
header_params = opts[:header_params] || {}
|
341
|
-
# HTTP header 'Accept' (if needed)
|
342
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
343
|
-
|
344
|
-
# form parameters
|
345
|
-
form_params = opts[:form_params] || {}
|
346
|
-
|
347
|
-
# http body (model)
|
348
|
-
post_body = opts[:body]
|
349
|
-
|
350
|
-
# return_type
|
351
|
-
return_type = opts[:return_type] || 'FileFileFilesystemExporterResponse'
|
352
|
-
|
353
|
-
# auth_names
|
354
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
355
|
-
|
356
|
-
new_options = opts.merge(
|
357
|
-
:header_params => header_params,
|
358
|
-
:query_params => query_params,
|
359
|
-
:form_params => form_params,
|
360
|
-
:body => post_body,
|
361
|
-
:auth_names => auth_names,
|
362
|
-
:return_type => return_type
|
363
|
-
)
|
364
|
-
|
365
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
366
|
-
if @api_client.config.debugging
|
367
|
-
@api_client.config.logger.debug "API called: ExportersFilesystemApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
368
|
-
end
|
369
|
-
return data, status_code, headers
|
370
|
-
end
|
371
|
-
|
372
|
-
# Update a file filesystem exporter
|
373
|
-
# Trigger an asynchronous update task
|
374
|
-
# @param file_file_filesystem_exporter_href [String]
|
375
|
-
# @param file_file_filesystem_exporter [FileFileFilesystemExporter]
|
376
|
-
# @param [Hash] opts the optional parameters
|
377
|
-
# @return [AsyncOperationResponse]
|
378
|
-
def update(file_file_filesystem_exporter_href, file_file_filesystem_exporter, opts = {})
|
379
|
-
data, _status_code, _headers = update_with_http_info(file_file_filesystem_exporter_href, file_file_filesystem_exporter, opts)
|
380
|
-
data
|
381
|
-
end
|
382
|
-
|
383
|
-
# Update a file filesystem exporter
|
384
|
-
# Trigger an asynchronous update task
|
385
|
-
# @param file_file_filesystem_exporter_href [String]
|
386
|
-
# @param file_file_filesystem_exporter [FileFileFilesystemExporter]
|
387
|
-
# @param [Hash] opts the optional parameters
|
388
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
389
|
-
def update_with_http_info(file_file_filesystem_exporter_href, file_file_filesystem_exporter, opts = {})
|
390
|
-
if @api_client.config.debugging
|
391
|
-
@api_client.config.logger.debug 'Calling API: ExportersFilesystemApi.update ...'
|
392
|
-
end
|
393
|
-
# verify the required parameter 'file_file_filesystem_exporter_href' is set
|
394
|
-
if @api_client.config.client_side_validation && file_file_filesystem_exporter_href.nil?
|
395
|
-
fail ArgumentError, "Missing the required parameter 'file_file_filesystem_exporter_href' when calling ExportersFilesystemApi.update"
|
396
|
-
end
|
397
|
-
# verify the required parameter 'file_file_filesystem_exporter' is set
|
398
|
-
if @api_client.config.client_side_validation && file_file_filesystem_exporter.nil?
|
399
|
-
fail ArgumentError, "Missing the required parameter 'file_file_filesystem_exporter' when calling ExportersFilesystemApi.update"
|
400
|
-
end
|
401
|
-
# resource path
|
402
|
-
local_var_path = '{file_file_filesystem_exporter_href}'.sub('{' + 'file_file_filesystem_exporter_href' + '}', CGI.escape(file_file_filesystem_exporter_href.to_s).gsub('%2F', '/'))
|
403
|
-
|
404
|
-
# query parameters
|
405
|
-
query_params = opts[:query_params] || {}
|
406
|
-
|
407
|
-
# header parameters
|
408
|
-
header_params = opts[:header_params] || {}
|
409
|
-
# HTTP header 'Accept' (if needed)
|
410
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
411
|
-
# HTTP header 'Content-Type'
|
412
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
413
|
-
|
414
|
-
# form parameters
|
415
|
-
form_params = opts[:form_params] || {}
|
416
|
-
|
417
|
-
# http body (model)
|
418
|
-
post_body = opts[:body] || @api_client.object_to_http_body(file_file_filesystem_exporter)
|
419
|
-
|
420
|
-
# return_type
|
421
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
422
|
-
|
423
|
-
# auth_names
|
424
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
425
|
-
|
426
|
-
new_options = opts.merge(
|
427
|
-
:header_params => header_params,
|
428
|
-
:query_params => query_params,
|
429
|
-
:form_params => form_params,
|
430
|
-
:body => post_body,
|
431
|
-
:auth_names => auth_names,
|
432
|
-
:return_type => return_type
|
433
|
-
)
|
434
|
-
|
435
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
436
|
-
if @api_client.config.debugging
|
437
|
-
@api_client.config.logger.debug "API called: ExportersFilesystemApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
438
|
-
end
|
439
|
-
return data, status_code, headers
|
440
|
-
end
|
441
|
-
end
|
442
|
-
end
|
@@ -1,250 +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.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpFileClient
|
16
|
-
# Base serializer for Exports.
|
17
|
-
class ExportResponse
|
18
|
-
attr_accessor :pulp_href
|
19
|
-
|
20
|
-
# Timestamp of creation.
|
21
|
-
attr_accessor :pulp_created
|
22
|
-
|
23
|
-
# A URI of the task that ran the Export.
|
24
|
-
attr_accessor :task
|
25
|
-
|
26
|
-
# Resources that were exported.
|
27
|
-
attr_accessor :exported_resources
|
28
|
-
|
29
|
-
# Any additional parameters that were used to create the export.
|
30
|
-
attr_accessor :params
|
31
|
-
|
32
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
-
def self.attribute_map
|
34
|
-
{
|
35
|
-
:'pulp_href' => :'pulp_href',
|
36
|
-
:'pulp_created' => :'pulp_created',
|
37
|
-
:'task' => :'task',
|
38
|
-
:'exported_resources' => :'exported_resources',
|
39
|
-
:'params' => :'params'
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
# Attribute type mapping.
|
44
|
-
def self.openapi_types
|
45
|
-
{
|
46
|
-
:'pulp_href' => :'String',
|
47
|
-
:'pulp_created' => :'DateTime',
|
48
|
-
:'task' => :'String',
|
49
|
-
:'exported_resources' => :'Array<Object>',
|
50
|
-
:'params' => :'Object'
|
51
|
-
}
|
52
|
-
end
|
53
|
-
|
54
|
-
# List of attributes with nullable: true
|
55
|
-
def self.openapi_nullable
|
56
|
-
Set.new([
|
57
|
-
:'task',
|
58
|
-
])
|
59
|
-
end
|
60
|
-
|
61
|
-
# Initializes the object
|
62
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
-
def initialize(attributes = {})
|
64
|
-
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::ExportResponse` initialize method"
|
66
|
-
end
|
67
|
-
|
68
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::ExportResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
-
end
|
73
|
-
h[k.to_sym] = v
|
74
|
-
}
|
75
|
-
|
76
|
-
if attributes.key?(:'pulp_href')
|
77
|
-
self.pulp_href = attributes[:'pulp_href']
|
78
|
-
end
|
79
|
-
|
80
|
-
if attributes.key?(:'pulp_created')
|
81
|
-
self.pulp_created = attributes[:'pulp_created']
|
82
|
-
end
|
83
|
-
|
84
|
-
if attributes.key?(:'task')
|
85
|
-
self.task = attributes[:'task']
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes.key?(:'exported_resources')
|
89
|
-
if (value = attributes[:'exported_resources']).is_a?(Array)
|
90
|
-
self.exported_resources = value
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
if attributes.key?(:'params')
|
95
|
-
self.params = attributes[:'params']
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
100
|
-
# @return Array for valid properties with the reasons
|
101
|
-
def list_invalid_properties
|
102
|
-
invalid_properties = Array.new
|
103
|
-
invalid_properties
|
104
|
-
end
|
105
|
-
|
106
|
-
# Check to see if the all the properties in the model are valid
|
107
|
-
# @return true if the model is valid
|
108
|
-
def valid?
|
109
|
-
true
|
110
|
-
end
|
111
|
-
|
112
|
-
# Checks equality by comparing each attribute.
|
113
|
-
# @param [Object] Object to be compared
|
114
|
-
def ==(o)
|
115
|
-
return true if self.equal?(o)
|
116
|
-
self.class == o.class &&
|
117
|
-
pulp_href == o.pulp_href &&
|
118
|
-
pulp_created == o.pulp_created &&
|
119
|
-
task == o.task &&
|
120
|
-
exported_resources == o.exported_resources &&
|
121
|
-
params == o.params
|
122
|
-
end
|
123
|
-
|
124
|
-
# @see the `==` method
|
125
|
-
# @param [Object] Object to be compared
|
126
|
-
def eql?(o)
|
127
|
-
self == o
|
128
|
-
end
|
129
|
-
|
130
|
-
# Calculates hash code according to all attributes.
|
131
|
-
# @return [Integer] Hash code
|
132
|
-
def hash
|
133
|
-
[pulp_href, pulp_created, task, exported_resources, params].hash
|
134
|
-
end
|
135
|
-
|
136
|
-
# Builds the object from hash
|
137
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
-
# @return [Object] Returns the model itself
|
139
|
-
def self.build_from_hash(attributes)
|
140
|
-
new.build_from_hash(attributes)
|
141
|
-
end
|
142
|
-
|
143
|
-
# Builds the object from hash
|
144
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
-
# @return [Object] Returns the model itself
|
146
|
-
def build_from_hash(attributes)
|
147
|
-
return nil unless attributes.is_a?(Hash)
|
148
|
-
self.class.openapi_types.each_pair do |key, type|
|
149
|
-
if type =~ /\AArray<(.*)>/i
|
150
|
-
# check to ensure the input is an array given that the attribute
|
151
|
-
# is documented as an array but the input is not
|
152
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
154
|
-
end
|
155
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
158
|
-
end
|
159
|
-
|
160
|
-
self
|
161
|
-
end
|
162
|
-
|
163
|
-
# Deserializes the data based on type
|
164
|
-
# @param string type Data type
|
165
|
-
# @param string value Value to be deserialized
|
166
|
-
# @return [Object] Deserialized data
|
167
|
-
def _deserialize(type, value)
|
168
|
-
case type.to_sym
|
169
|
-
when :DateTime
|
170
|
-
DateTime.parse(value)
|
171
|
-
when :Date
|
172
|
-
Date.parse(value)
|
173
|
-
when :String
|
174
|
-
value.to_s
|
175
|
-
when :Integer
|
176
|
-
value.to_i
|
177
|
-
when :Float
|
178
|
-
value.to_f
|
179
|
-
when :Boolean
|
180
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
-
true
|
182
|
-
else
|
183
|
-
false
|
184
|
-
end
|
185
|
-
when :Object
|
186
|
-
# generic object (usually a Hash), return directly
|
187
|
-
value
|
188
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
-
inner_type = Regexp.last_match[:inner_type]
|
190
|
-
value.map { |v| _deserialize(inner_type, v) }
|
191
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
-
k_type = Regexp.last_match[:k_type]
|
193
|
-
v_type = Regexp.last_match[:v_type]
|
194
|
-
{}.tap do |hash|
|
195
|
-
value.each do |k, v|
|
196
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
-
end
|
198
|
-
end
|
199
|
-
else # model
|
200
|
-
PulpFileClient.const_get(type).build_from_hash(value)
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
# Returns the string representation of the object
|
205
|
-
# @return [String] String presentation of the object
|
206
|
-
def to_s
|
207
|
-
to_hash.to_s
|
208
|
-
end
|
209
|
-
|
210
|
-
# to_body is an alias to to_hash (backward compatibility)
|
211
|
-
# @return [Hash] Returns the object in the form of hash
|
212
|
-
def to_body
|
213
|
-
to_hash
|
214
|
-
end
|
215
|
-
|
216
|
-
# Returns the object in the form of hash
|
217
|
-
# @return [Hash] Returns the object in the form of hash
|
218
|
-
def to_hash
|
219
|
-
hash = {}
|
220
|
-
self.class.attribute_map.each_pair do |attr, param|
|
221
|
-
value = self.send(attr)
|
222
|
-
if value.nil?
|
223
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
224
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
225
|
-
end
|
226
|
-
|
227
|
-
hash[param] = _to_hash(value)
|
228
|
-
end
|
229
|
-
hash
|
230
|
-
end
|
231
|
-
|
232
|
-
# Outputs non-array value in the form of hash
|
233
|
-
# For object, use to_hash. Otherwise, just return the value
|
234
|
-
# @param [Object] value Any valid value
|
235
|
-
# @return [Hash] Returns the value in the form of hash
|
236
|
-
def _to_hash(value)
|
237
|
-
if value.is_a?(Array)
|
238
|
-
value.compact.map { |v| _to_hash(v) }
|
239
|
-
elsif value.is_a?(Hash)
|
240
|
-
{}.tap do |hash|
|
241
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
242
|
-
end
|
243
|
-
elsif value.respond_to? :to_hash
|
244
|
-
value.to_hash
|
245
|
-
else
|
246
|
-
value
|
247
|
-
end
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|