pulp_maven_client 0.26.0 → 0.27.1

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.
@@ -0,0 +1,354 @@
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 PulpMavenClient
16
+ class ContentMavenIndexPageApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List maven index pages
23
+ # A read-only ViewSet for MavenIndexPage.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
26
+ # @option opts [Integer] :limit Number of results to return per page.
27
+ # @option opts [Integer] :offset The initial index from which to return the results.
28
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
29
+ # @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
30
+ # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
31
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
32
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
33
+ # @option opts [String] :pulp_label_select Filter labels by search string
34
+ # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
35
+ # @option opts [String] :repository_version
36
+ # @option opts [String] :repository_version_added
37
+ # @option opts [String] :repository_version_removed
38
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
39
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
40
+ # @return [PaginatedmavenMavenIndexPageResponseList]
41
+ def list(opts = {})
42
+ data, _status_code, _headers = list_with_http_info(opts)
43
+ data
44
+ end
45
+
46
+ # List maven index pages
47
+ # A read-only ViewSet for MavenIndexPage.
48
+ # @param [Hash] opts the optional parameters
49
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
50
+ # @option opts [Integer] :limit Number of results to return per page.
51
+ # @option opts [Integer] :offset The initial index from which to return the results.
52
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
53
+ # @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
54
+ # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
55
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
56
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
57
+ # @option opts [String] :pulp_label_select Filter labels by search string
58
+ # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
59
+ # @option opts [String] :repository_version
60
+ # @option opts [String] :repository_version_added
61
+ # @option opts [String] :repository_version_removed
62
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
63
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
64
+ # @return [Array<(PaginatedmavenMavenIndexPageResponseList, Integer, Hash)>] PaginatedmavenMavenIndexPageResponseList data, response status code and response headers
65
+ def list_with_http_info(opts = {})
66
+ if @api_client.config.debugging
67
+ @api_client.config.logger.debug 'Calling API: ContentMavenIndexPageApi.list ...'
68
+ end
69
+ allowable_values = ["-pk", "pk"]
70
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
71
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
72
+ end
73
+ # resource path
74
+ local_var_path = '/pulp/api/v3/content/maven/maven/index-page/'
75
+
76
+ # query parameters
77
+ query_params = opts[:query_params] || {}
78
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
79
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
80
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
81
+ query_params[:'orphaned_for'] = opts[:'orphaned_for'] if !opts[:'orphaned_for'].nil?
82
+ query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
83
+ query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
84
+ query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
85
+ query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
86
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
87
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
88
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
89
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
90
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
91
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
92
+
93
+ # header parameters
94
+ header_params = opts[:header_params] || {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
97
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
98
+
99
+ # form parameters
100
+ form_params = opts[:form_params] || {}
101
+
102
+ # http body (model)
103
+ post_body = opts[:debug_body]
104
+
105
+ # return_type
106
+ return_type = opts[:debug_return_type] || 'PaginatedmavenMavenIndexPageResponseList'
107
+
108
+ # auth_names
109
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
110
+
111
+ new_options = opts.merge(
112
+ :operation => :"ContentMavenIndexPageApi.list",
113
+ :header_params => header_params,
114
+ :query_params => query_params,
115
+ :form_params => form_params,
116
+ :body => post_body,
117
+ :auth_names => auth_names,
118
+ :return_type => return_type
119
+ )
120
+
121
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug "API called: ContentMavenIndexPageApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
124
+ end
125
+ return data, status_code, headers
126
+ end
127
+
128
+ # Inspect a maven index page
129
+ # A read-only ViewSet for MavenIndexPage.
130
+ # @param maven_maven_index_page_href [String]
131
+ # @param [Hash] opts the optional parameters
132
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
133
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
134
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
135
+ # @return [MavenMavenIndexPageResponse]
136
+ def read(maven_maven_index_page_href, opts = {})
137
+ data, _status_code, _headers = read_with_http_info(maven_maven_index_page_href, opts)
138
+ data
139
+ end
140
+
141
+ # Inspect a maven index page
142
+ # A read-only ViewSet for MavenIndexPage.
143
+ # @param maven_maven_index_page_href [String]
144
+ # @param [Hash] opts the optional parameters
145
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
146
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
147
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
148
+ # @return [Array<(MavenMavenIndexPageResponse, Integer, Hash)>] MavenMavenIndexPageResponse data, response status code and response headers
149
+ def read_with_http_info(maven_maven_index_page_href, opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: ContentMavenIndexPageApi.read ...'
152
+ end
153
+ # verify the required parameter 'maven_maven_index_page_href' is set
154
+ if @api_client.config.client_side_validation && maven_maven_index_page_href.nil?
155
+ fail ArgumentError, "Missing the required parameter 'maven_maven_index_page_href' when calling ContentMavenIndexPageApi.read"
156
+ end
157
+ # resource path
158
+ local_var_path = '{maven_maven_index_page_href}'.sub('{' + 'maven_maven_index_page_href' + '}', CGI.escape(maven_maven_index_page_href.to_s).gsub('%2F', '/'))
159
+
160
+ # query parameters
161
+ query_params = opts[:query_params] || {}
162
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
163
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
164
+
165
+ # header parameters
166
+ header_params = opts[:header_params] || {}
167
+ # HTTP header 'Accept' (if needed)
168
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
169
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
170
+
171
+ # form parameters
172
+ form_params = opts[:form_params] || {}
173
+
174
+ # http body (model)
175
+ post_body = opts[:debug_body]
176
+
177
+ # return_type
178
+ return_type = opts[:debug_return_type] || 'MavenMavenIndexPageResponse'
179
+
180
+ # auth_names
181
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
182
+
183
+ new_options = opts.merge(
184
+ :operation => :"ContentMavenIndexPageApi.read",
185
+ :header_params => header_params,
186
+ :query_params => query_params,
187
+ :form_params => form_params,
188
+ :body => post_body,
189
+ :auth_names => auth_names,
190
+ :return_type => return_type
191
+ )
192
+
193
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug "API called: ContentMavenIndexPageApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ return data, status_code, headers
198
+ end
199
+
200
+ # Set a label
201
+ # Set a single pulp_label on the object to a specific value or null.
202
+ # @param maven_maven_index_page_href [String]
203
+ # @param set_label [SetLabel]
204
+ # @param [Hash] opts the optional parameters
205
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
206
+ # @return [SetLabelResponse]
207
+ def set_label(maven_maven_index_page_href, set_label, opts = {})
208
+ data, _status_code, _headers = set_label_with_http_info(maven_maven_index_page_href, set_label, opts)
209
+ data
210
+ end
211
+
212
+ # Set a label
213
+ # Set a single pulp_label on the object to a specific value or null.
214
+ # @param maven_maven_index_page_href [String]
215
+ # @param set_label [SetLabel]
216
+ # @param [Hash] opts the optional parameters
217
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
218
+ # @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
219
+ def set_label_with_http_info(maven_maven_index_page_href, set_label, opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: ContentMavenIndexPageApi.set_label ...'
222
+ end
223
+ # verify the required parameter 'maven_maven_index_page_href' is set
224
+ if @api_client.config.client_side_validation && maven_maven_index_page_href.nil?
225
+ fail ArgumentError, "Missing the required parameter 'maven_maven_index_page_href' when calling ContentMavenIndexPageApi.set_label"
226
+ end
227
+ # verify the required parameter 'set_label' is set
228
+ if @api_client.config.client_side_validation && set_label.nil?
229
+ fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentMavenIndexPageApi.set_label"
230
+ end
231
+ # resource path
232
+ local_var_path = '{maven_maven_index_page_href}set_label/'.sub('{' + 'maven_maven_index_page_href' + '}', CGI.escape(maven_maven_index_page_href.to_s).gsub('%2F', '/'))
233
+
234
+ # query parameters
235
+ query_params = opts[:query_params] || {}
236
+
237
+ # header parameters
238
+ header_params = opts[:header_params] || {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
241
+ # HTTP header 'Content-Type'
242
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
243
+ if !content_type.nil?
244
+ header_params['Content-Type'] = content_type
245
+ end
246
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
247
+
248
+ # form parameters
249
+ form_params = opts[:form_params] || {}
250
+
251
+ # http body (model)
252
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
253
+
254
+ # return_type
255
+ return_type = opts[:debug_return_type] || 'SetLabelResponse'
256
+
257
+ # auth_names
258
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
259
+
260
+ new_options = opts.merge(
261
+ :operation => :"ContentMavenIndexPageApi.set_label",
262
+ :header_params => header_params,
263
+ :query_params => query_params,
264
+ :form_params => form_params,
265
+ :body => post_body,
266
+ :auth_names => auth_names,
267
+ :return_type => return_type
268
+ )
269
+
270
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
271
+ if @api_client.config.debugging
272
+ @api_client.config.logger.debug "API called: ContentMavenIndexPageApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
273
+ end
274
+ return data, status_code, headers
275
+ end
276
+
277
+ # Unset a label
278
+ # Unset a single pulp_label on the object.
279
+ # @param maven_maven_index_page_href [String]
280
+ # @param unset_label [UnsetLabel]
281
+ # @param [Hash] opts the optional parameters
282
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
283
+ # @return [UnsetLabelResponse]
284
+ def unset_label(maven_maven_index_page_href, unset_label, opts = {})
285
+ data, _status_code, _headers = unset_label_with_http_info(maven_maven_index_page_href, unset_label, opts)
286
+ data
287
+ end
288
+
289
+ # Unset a label
290
+ # Unset a single pulp_label on the object.
291
+ # @param maven_maven_index_page_href [String]
292
+ # @param unset_label [UnsetLabel]
293
+ # @param [Hash] opts the optional parameters
294
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
295
+ # @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
296
+ def unset_label_with_http_info(maven_maven_index_page_href, unset_label, opts = {})
297
+ if @api_client.config.debugging
298
+ @api_client.config.logger.debug 'Calling API: ContentMavenIndexPageApi.unset_label ...'
299
+ end
300
+ # verify the required parameter 'maven_maven_index_page_href' is set
301
+ if @api_client.config.client_side_validation && maven_maven_index_page_href.nil?
302
+ fail ArgumentError, "Missing the required parameter 'maven_maven_index_page_href' when calling ContentMavenIndexPageApi.unset_label"
303
+ end
304
+ # verify the required parameter 'unset_label' is set
305
+ if @api_client.config.client_side_validation && unset_label.nil?
306
+ fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentMavenIndexPageApi.unset_label"
307
+ end
308
+ # resource path
309
+ local_var_path = '{maven_maven_index_page_href}unset_label/'.sub('{' + 'maven_maven_index_page_href' + '}', CGI.escape(maven_maven_index_page_href.to_s).gsub('%2F', '/'))
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+
314
+ # header parameters
315
+ header_params = opts[:header_params] || {}
316
+ # HTTP header 'Accept' (if needed)
317
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
318
+ # HTTP header 'Content-Type'
319
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
320
+ if !content_type.nil?
321
+ header_params['Content-Type'] = content_type
322
+ end
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] || @api_client.object_to_http_body(unset_label)
330
+
331
+ # return_type
332
+ return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
333
+
334
+ # auth_names
335
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
336
+
337
+ new_options = opts.merge(
338
+ :operation => :"ContentMavenIndexPageApi.unset_label",
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(:POST, local_var_path, new_options)
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug "API called: ContentMavenIndexPageApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
350
+ end
351
+ return data, status_code, headers
352
+ end
353
+ end
354
+ end
@@ -1091,6 +1091,72 @@ module PulpMavenClient
1091
1091
  return data, status_code, headers
1092
1092
  end
1093
1093
 
1094
+ # Repair index pages
1095
+ # Trigger an asynchronous task to generate (or regenerate) HTML directory index pages for every directory in the latest repository version. This is a one-time catch-up for repositories created before the pre-generation feature was deployed. After the task completes every directory URL will be served by a pre-generated page rather than the on-demand fallback.
1096
+ # @param maven_maven_repository_href [String]
1097
+ # @param [Hash] opts the optional parameters
1098
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
1099
+ # @return [AsyncOperationResponse]
1100
+ def repair_index_pages(maven_maven_repository_href, opts = {})
1101
+ data, _status_code, _headers = repair_index_pages_with_http_info(maven_maven_repository_href, opts)
1102
+ data
1103
+ end
1104
+
1105
+ # Repair index pages
1106
+ # Trigger an asynchronous task to generate (or regenerate) HTML directory index pages for every directory in the latest repository version. This is a one-time catch-up for repositories created before the pre-generation feature was deployed. After the task completes every directory URL will be served by a pre-generated page rather than the on-demand fallback.
1107
+ # @param maven_maven_repository_href [String]
1108
+ # @param [Hash] opts the optional parameters
1109
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
1110
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
1111
+ def repair_index_pages_with_http_info(maven_maven_repository_href, opts = {})
1112
+ if @api_client.config.debugging
1113
+ @api_client.config.logger.debug 'Calling API: RepositoriesMavenApi.repair_index_pages ...'
1114
+ end
1115
+ # verify the required parameter 'maven_maven_repository_href' is set
1116
+ if @api_client.config.client_side_validation && maven_maven_repository_href.nil?
1117
+ fail ArgumentError, "Missing the required parameter 'maven_maven_repository_href' when calling RepositoriesMavenApi.repair_index_pages"
1118
+ end
1119
+ # resource path
1120
+ local_var_path = '{maven_maven_repository_href}repair_index_pages/'.sub('{' + 'maven_maven_repository_href' + '}', CGI.escape(maven_maven_repository_href.to_s).gsub('%2F', '/'))
1121
+
1122
+ # query parameters
1123
+ query_params = opts[:query_params] || {}
1124
+
1125
+ # header parameters
1126
+ header_params = opts[:header_params] || {}
1127
+ # HTTP header 'Accept' (if needed)
1128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1129
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
1130
+
1131
+ # form parameters
1132
+ form_params = opts[:form_params] || {}
1133
+
1134
+ # http body (model)
1135
+ post_body = opts[:debug_body]
1136
+
1137
+ # return_type
1138
+ return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
1139
+
1140
+ # auth_names
1141
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
1142
+
1143
+ new_options = opts.merge(
1144
+ :operation => :"RepositoriesMavenApi.repair_index_pages",
1145
+ :header_params => header_params,
1146
+ :query_params => query_params,
1147
+ :form_params => form_params,
1148
+ :body => post_body,
1149
+ :auth_names => auth_names,
1150
+ :return_type => return_type
1151
+ )
1152
+
1153
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1154
+ if @api_client.config.debugging
1155
+ @api_client.config.logger.debug "API called: RepositoriesMavenApi#repair_index_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1156
+ end
1157
+ return data, status_code, headers
1158
+ end
1159
+
1094
1160
  # Repair metadata
1095
1161
  # Trigger an asynchronous task to regenerate all maven-metadata.xml files and their checksums for every artifact in the repository.
1096
1162
  # @param maven_maven_repository_href [String]