pulpcore_client 3.73.1 → 3.73.2

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.
@@ -6,6 +6,8 @@ All URIs are relative to *http://localhost:24817*
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**list**](ContentOpenpgpUseridApi.md#list) | **GET** /pulp/api/v3/content/core/openpgp_userid/ | List open pgp user ids |
8
8
  | [**read**](ContentOpenpgpUseridApi.md#read) | **GET** {open_p_g_p_user_i_d_href} | Inspect an open pgp user id |
9
+ | [**set_label**](ContentOpenpgpUseridApi.md#set_label) | **POST** {open_p_g_p_user_i_d_href}set_label/ | Set a label |
10
+ | [**unset_label**](ContentOpenpgpUseridApi.md#unset_label) | **POST** {open_p_g_p_user_i_d_href}unset_label/ | Unset a label |
9
11
 
10
12
 
11
13
  ## list
@@ -199,3 +201,147 @@ end
199
201
  - **Content-Type**: Not defined
200
202
  - **Accept**: application/json
201
203
 
204
+
205
+ ## set_label
206
+
207
+ > <SetLabelResponse> set_label(open_p_g_p_user_i_d_href, set_label)
208
+
209
+ Set a label
210
+
211
+ Set a single pulp_label on the object to a specific value or null.
212
+
213
+ ### Examples
214
+
215
+ ```ruby
216
+ require 'time'
217
+ require 'pulpcore_client'
218
+ # setup authorization
219
+ PulpcoreClient.configure do |config|
220
+ # Configure HTTP basic authorization: basicAuth
221
+ config.username = 'YOUR USERNAME'
222
+ config.password = 'YOUR PASSWORD'
223
+ end
224
+
225
+ api_instance = PulpcoreClient::ContentOpenpgpUseridApi.new
226
+ open_p_g_p_user_i_d_href = 'open_p_g_p_user_i_d_href_example' # String |
227
+ set_label = PulpcoreClient::SetLabel.new({key: 'key_example', value: 'value_example'}) # SetLabel |
228
+
229
+ begin
230
+ # Set a label
231
+ result = api_instance.set_label(open_p_g_p_user_i_d_href, set_label)
232
+ p result
233
+ rescue PulpcoreClient::ApiError => e
234
+ puts "Error when calling ContentOpenpgpUseridApi->set_label: #{e}"
235
+ end
236
+ ```
237
+
238
+ #### Using the set_label_with_http_info variant
239
+
240
+ This returns an Array which contains the response data, status code and headers.
241
+
242
+ > <Array(<SetLabelResponse>, Integer, Hash)> set_label_with_http_info(open_p_g_p_user_i_d_href, set_label)
243
+
244
+ ```ruby
245
+ begin
246
+ # Set a label
247
+ data, status_code, headers = api_instance.set_label_with_http_info(open_p_g_p_user_i_d_href, set_label)
248
+ p status_code # => 2xx
249
+ p headers # => { ... }
250
+ p data # => <SetLabelResponse>
251
+ rescue PulpcoreClient::ApiError => e
252
+ puts "Error when calling ContentOpenpgpUseridApi->set_label_with_http_info: #{e}"
253
+ end
254
+ ```
255
+
256
+ ### Parameters
257
+
258
+ | Name | Type | Description | Notes |
259
+ | ---- | ---- | ----------- | ----- |
260
+ | **open_p_g_p_user_i_d_href** | **String** | | |
261
+ | **set_label** | [**SetLabel**](SetLabel.md) | | |
262
+
263
+ ### Return type
264
+
265
+ [**SetLabelResponse**](SetLabelResponse.md)
266
+
267
+ ### Authorization
268
+
269
+ [basicAuth](../README.md#basicAuth)
270
+
271
+ ### HTTP request headers
272
+
273
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
274
+ - **Accept**: application/json
275
+
276
+
277
+ ## unset_label
278
+
279
+ > <UnsetLabelResponse> unset_label(open_p_g_p_user_i_d_href, unset_label)
280
+
281
+ Unset a label
282
+
283
+ Unset a single pulp_label on the object.
284
+
285
+ ### Examples
286
+
287
+ ```ruby
288
+ require 'time'
289
+ require 'pulpcore_client'
290
+ # setup authorization
291
+ PulpcoreClient.configure do |config|
292
+ # Configure HTTP basic authorization: basicAuth
293
+ config.username = 'YOUR USERNAME'
294
+ config.password = 'YOUR PASSWORD'
295
+ end
296
+
297
+ api_instance = PulpcoreClient::ContentOpenpgpUseridApi.new
298
+ open_p_g_p_user_i_d_href = 'open_p_g_p_user_i_d_href_example' # String |
299
+ unset_label = PulpcoreClient::UnsetLabel.new({key: 'key_example'}) # UnsetLabel |
300
+
301
+ begin
302
+ # Unset a label
303
+ result = api_instance.unset_label(open_p_g_p_user_i_d_href, unset_label)
304
+ p result
305
+ rescue PulpcoreClient::ApiError => e
306
+ puts "Error when calling ContentOpenpgpUseridApi->unset_label: #{e}"
307
+ end
308
+ ```
309
+
310
+ #### Using the unset_label_with_http_info variant
311
+
312
+ This returns an Array which contains the response data, status code and headers.
313
+
314
+ > <Array(<UnsetLabelResponse>, Integer, Hash)> unset_label_with_http_info(open_p_g_p_user_i_d_href, unset_label)
315
+
316
+ ```ruby
317
+ begin
318
+ # Unset a label
319
+ data, status_code, headers = api_instance.unset_label_with_http_info(open_p_g_p_user_i_d_href, unset_label)
320
+ p status_code # => 2xx
321
+ p headers # => { ... }
322
+ p data # => <UnsetLabelResponse>
323
+ rescue PulpcoreClient::ApiError => e
324
+ puts "Error when calling ContentOpenpgpUseridApi->unset_label_with_http_info: #{e}"
325
+ end
326
+ ```
327
+
328
+ ### Parameters
329
+
330
+ | Name | Type | Description | Notes |
331
+ | ---- | ---- | ----------- | ----- |
332
+ | **open_p_g_p_user_i_d_href** | **String** | | |
333
+ | **unset_label** | [**UnsetLabel**](UnsetLabel.md) | | |
334
+
335
+ ### Return type
336
+
337
+ [**UnsetLabelResponse**](UnsetLabelResponse.md)
338
+
339
+ ### Authorization
340
+
341
+ [basicAuth](../README.md#basicAuth)
342
+
343
+ ### HTTP request headers
344
+
345
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
346
+ - **Accept**: application/json
347
+
@@ -193,5 +193,153 @@ module PulpcoreClient
193
193
  end
194
194
  return data, status_code, headers
195
195
  end
196
+
197
+ # Set a label
198
+ # Set a single pulp_label on the object to a specific value or null.
199
+ # @param open_p_g_p_public_subkey_href [String]
200
+ # @param set_label [SetLabel]
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [SetLabelResponse]
203
+ def set_label(open_p_g_p_public_subkey_href, set_label, opts = {})
204
+ data, _status_code, _headers = set_label_with_http_info(open_p_g_p_public_subkey_href, set_label, opts)
205
+ data
206
+ end
207
+
208
+ # Set a label
209
+ # Set a single pulp_label on the object to a specific value or null.
210
+ # @param open_p_g_p_public_subkey_href [String]
211
+ # @param set_label [SetLabel]
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
214
+ def set_label_with_http_info(open_p_g_p_public_subkey_href, set_label, opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: ContentOpenpgpPublicsubkeyApi.set_label ...'
217
+ end
218
+ # verify the required parameter 'open_p_g_p_public_subkey_href' is set
219
+ if @api_client.config.client_side_validation && open_p_g_p_public_subkey_href.nil?
220
+ fail ArgumentError, "Missing the required parameter 'open_p_g_p_public_subkey_href' when calling ContentOpenpgpPublicsubkeyApi.set_label"
221
+ end
222
+ # verify the required parameter 'set_label' is set
223
+ if @api_client.config.client_side_validation && set_label.nil?
224
+ fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentOpenpgpPublicsubkeyApi.set_label"
225
+ end
226
+ # resource path
227
+ local_var_path = '{open_p_g_p_public_subkey_href}set_label/'.sub('{' + 'open_p_g_p_public_subkey_href' + '}', CGI.escape(open_p_g_p_public_subkey_href.to_s).gsub('%2F', '/'))
228
+
229
+ # query parameters
230
+ query_params = opts[:query_params] || {}
231
+
232
+ # header parameters
233
+ header_params = opts[:header_params] || {}
234
+ # HTTP header 'Accept' (if needed)
235
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
236
+ # HTTP header 'Content-Type'
237
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
238
+ if !content_type.nil?
239
+ header_params['Content-Type'] = content_type
240
+ end
241
+
242
+ # form parameters
243
+ form_params = opts[:form_params] || {}
244
+
245
+ # http body (model)
246
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
247
+
248
+ # return_type
249
+ return_type = opts[:debug_return_type] || 'SetLabelResponse'
250
+
251
+ # auth_names
252
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
253
+
254
+ new_options = opts.merge(
255
+ :operation => :"ContentOpenpgpPublicsubkeyApi.set_label",
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => return_type
262
+ )
263
+
264
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: ContentOpenpgpPublicsubkeyApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+
271
+ # Unset a label
272
+ # Unset a single pulp_label on the object.
273
+ # @param open_p_g_p_public_subkey_href [String]
274
+ # @param unset_label [UnsetLabel]
275
+ # @param [Hash] opts the optional parameters
276
+ # @return [UnsetLabelResponse]
277
+ def unset_label(open_p_g_p_public_subkey_href, unset_label, opts = {})
278
+ data, _status_code, _headers = unset_label_with_http_info(open_p_g_p_public_subkey_href, unset_label, opts)
279
+ data
280
+ end
281
+
282
+ # Unset a label
283
+ # Unset a single pulp_label on the object.
284
+ # @param open_p_g_p_public_subkey_href [String]
285
+ # @param unset_label [UnsetLabel]
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
288
+ def unset_label_with_http_info(open_p_g_p_public_subkey_href, unset_label, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug 'Calling API: ContentOpenpgpPublicsubkeyApi.unset_label ...'
291
+ end
292
+ # verify the required parameter 'open_p_g_p_public_subkey_href' is set
293
+ if @api_client.config.client_side_validation && open_p_g_p_public_subkey_href.nil?
294
+ fail ArgumentError, "Missing the required parameter 'open_p_g_p_public_subkey_href' when calling ContentOpenpgpPublicsubkeyApi.unset_label"
295
+ end
296
+ # verify the required parameter 'unset_label' is set
297
+ if @api_client.config.client_side_validation && unset_label.nil?
298
+ fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentOpenpgpPublicsubkeyApi.unset_label"
299
+ end
300
+ # resource path
301
+ local_var_path = '{open_p_g_p_public_subkey_href}unset_label/'.sub('{' + 'open_p_g_p_public_subkey_href' + '}', CGI.escape(open_p_g_p_public_subkey_href.to_s).gsub('%2F', '/'))
302
+
303
+ # query parameters
304
+ query_params = opts[:query_params] || {}
305
+
306
+ # header parameters
307
+ header_params = opts[:header_params] || {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
310
+ # HTTP header 'Content-Type'
311
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
312
+ if !content_type.nil?
313
+ header_params['Content-Type'] = content_type
314
+ end
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"ContentOpenpgpPublicsubkeyApi.unset_label",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: ContentOpenpgpPublicsubkeyApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
196
344
  end
197
345
  end
@@ -193,5 +193,153 @@ module PulpcoreClient
193
193
  end
194
194
  return data, status_code, headers
195
195
  end
196
+
197
+ # Set a label
198
+ # Set a single pulp_label on the object to a specific value or null.
199
+ # @param open_p_g_p_signature_href [String]
200
+ # @param set_label [SetLabel]
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [SetLabelResponse]
203
+ def set_label(open_p_g_p_signature_href, set_label, opts = {})
204
+ data, _status_code, _headers = set_label_with_http_info(open_p_g_p_signature_href, set_label, opts)
205
+ data
206
+ end
207
+
208
+ # Set a label
209
+ # Set a single pulp_label on the object to a specific value or null.
210
+ # @param open_p_g_p_signature_href [String]
211
+ # @param set_label [SetLabel]
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
214
+ def set_label_with_http_info(open_p_g_p_signature_href, set_label, opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: ContentOpenpgpSignatureApi.set_label ...'
217
+ end
218
+ # verify the required parameter 'open_p_g_p_signature_href' is set
219
+ if @api_client.config.client_side_validation && open_p_g_p_signature_href.nil?
220
+ fail ArgumentError, "Missing the required parameter 'open_p_g_p_signature_href' when calling ContentOpenpgpSignatureApi.set_label"
221
+ end
222
+ # verify the required parameter 'set_label' is set
223
+ if @api_client.config.client_side_validation && set_label.nil?
224
+ fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentOpenpgpSignatureApi.set_label"
225
+ end
226
+ # resource path
227
+ local_var_path = '{open_p_g_p_signature_href}set_label/'.sub('{' + 'open_p_g_p_signature_href' + '}', CGI.escape(open_p_g_p_signature_href.to_s).gsub('%2F', '/'))
228
+
229
+ # query parameters
230
+ query_params = opts[:query_params] || {}
231
+
232
+ # header parameters
233
+ header_params = opts[:header_params] || {}
234
+ # HTTP header 'Accept' (if needed)
235
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
236
+ # HTTP header 'Content-Type'
237
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
238
+ if !content_type.nil?
239
+ header_params['Content-Type'] = content_type
240
+ end
241
+
242
+ # form parameters
243
+ form_params = opts[:form_params] || {}
244
+
245
+ # http body (model)
246
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
247
+
248
+ # return_type
249
+ return_type = opts[:debug_return_type] || 'SetLabelResponse'
250
+
251
+ # auth_names
252
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
253
+
254
+ new_options = opts.merge(
255
+ :operation => :"ContentOpenpgpSignatureApi.set_label",
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => return_type
262
+ )
263
+
264
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: ContentOpenpgpSignatureApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+
271
+ # Unset a label
272
+ # Unset a single pulp_label on the object.
273
+ # @param open_p_g_p_signature_href [String]
274
+ # @param unset_label [UnsetLabel]
275
+ # @param [Hash] opts the optional parameters
276
+ # @return [UnsetLabelResponse]
277
+ def unset_label(open_p_g_p_signature_href, unset_label, opts = {})
278
+ data, _status_code, _headers = unset_label_with_http_info(open_p_g_p_signature_href, unset_label, opts)
279
+ data
280
+ end
281
+
282
+ # Unset a label
283
+ # Unset a single pulp_label on the object.
284
+ # @param open_p_g_p_signature_href [String]
285
+ # @param unset_label [UnsetLabel]
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
288
+ def unset_label_with_http_info(open_p_g_p_signature_href, unset_label, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug 'Calling API: ContentOpenpgpSignatureApi.unset_label ...'
291
+ end
292
+ # verify the required parameter 'open_p_g_p_signature_href' is set
293
+ if @api_client.config.client_side_validation && open_p_g_p_signature_href.nil?
294
+ fail ArgumentError, "Missing the required parameter 'open_p_g_p_signature_href' when calling ContentOpenpgpSignatureApi.unset_label"
295
+ end
296
+ # verify the required parameter 'unset_label' is set
297
+ if @api_client.config.client_side_validation && unset_label.nil?
298
+ fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentOpenpgpSignatureApi.unset_label"
299
+ end
300
+ # resource path
301
+ local_var_path = '{open_p_g_p_signature_href}unset_label/'.sub('{' + 'open_p_g_p_signature_href' + '}', CGI.escape(open_p_g_p_signature_href.to_s).gsub('%2F', '/'))
302
+
303
+ # query parameters
304
+ query_params = opts[:query_params] || {}
305
+
306
+ # header parameters
307
+ header_params = opts[:header_params] || {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
310
+ # HTTP header 'Content-Type'
311
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
312
+ if !content_type.nil?
313
+ header_params['Content-Type'] = content_type
314
+ end
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"ContentOpenpgpSignatureApi.unset_label",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: ContentOpenpgpSignatureApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
196
344
  end
197
345
  end
@@ -193,5 +193,153 @@ module PulpcoreClient
193
193
  end
194
194
  return data, status_code, headers
195
195
  end
196
+
197
+ # Set a label
198
+ # Set a single pulp_label on the object to a specific value or null.
199
+ # @param open_p_g_p_user_attribute_href [String]
200
+ # @param set_label [SetLabel]
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [SetLabelResponse]
203
+ def set_label(open_p_g_p_user_attribute_href, set_label, opts = {})
204
+ data, _status_code, _headers = set_label_with_http_info(open_p_g_p_user_attribute_href, set_label, opts)
205
+ data
206
+ end
207
+
208
+ # Set a label
209
+ # Set a single pulp_label on the object to a specific value or null.
210
+ # @param open_p_g_p_user_attribute_href [String]
211
+ # @param set_label [SetLabel]
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
214
+ def set_label_with_http_info(open_p_g_p_user_attribute_href, set_label, opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: ContentOpenpgpUserattributeApi.set_label ...'
217
+ end
218
+ # verify the required parameter 'open_p_g_p_user_attribute_href' is set
219
+ if @api_client.config.client_side_validation && open_p_g_p_user_attribute_href.nil?
220
+ fail ArgumentError, "Missing the required parameter 'open_p_g_p_user_attribute_href' when calling ContentOpenpgpUserattributeApi.set_label"
221
+ end
222
+ # verify the required parameter 'set_label' is set
223
+ if @api_client.config.client_side_validation && set_label.nil?
224
+ fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentOpenpgpUserattributeApi.set_label"
225
+ end
226
+ # resource path
227
+ local_var_path = '{open_p_g_p_user_attribute_href}set_label/'.sub('{' + 'open_p_g_p_user_attribute_href' + '}', CGI.escape(open_p_g_p_user_attribute_href.to_s).gsub('%2F', '/'))
228
+
229
+ # query parameters
230
+ query_params = opts[:query_params] || {}
231
+
232
+ # header parameters
233
+ header_params = opts[:header_params] || {}
234
+ # HTTP header 'Accept' (if needed)
235
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
236
+ # HTTP header 'Content-Type'
237
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
238
+ if !content_type.nil?
239
+ header_params['Content-Type'] = content_type
240
+ end
241
+
242
+ # form parameters
243
+ form_params = opts[:form_params] || {}
244
+
245
+ # http body (model)
246
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
247
+
248
+ # return_type
249
+ return_type = opts[:debug_return_type] || 'SetLabelResponse'
250
+
251
+ # auth_names
252
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
253
+
254
+ new_options = opts.merge(
255
+ :operation => :"ContentOpenpgpUserattributeApi.set_label",
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => return_type
262
+ )
263
+
264
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: ContentOpenpgpUserattributeApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+
271
+ # Unset a label
272
+ # Unset a single pulp_label on the object.
273
+ # @param open_p_g_p_user_attribute_href [String]
274
+ # @param unset_label [UnsetLabel]
275
+ # @param [Hash] opts the optional parameters
276
+ # @return [UnsetLabelResponse]
277
+ def unset_label(open_p_g_p_user_attribute_href, unset_label, opts = {})
278
+ data, _status_code, _headers = unset_label_with_http_info(open_p_g_p_user_attribute_href, unset_label, opts)
279
+ data
280
+ end
281
+
282
+ # Unset a label
283
+ # Unset a single pulp_label on the object.
284
+ # @param open_p_g_p_user_attribute_href [String]
285
+ # @param unset_label [UnsetLabel]
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
288
+ def unset_label_with_http_info(open_p_g_p_user_attribute_href, unset_label, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug 'Calling API: ContentOpenpgpUserattributeApi.unset_label ...'
291
+ end
292
+ # verify the required parameter 'open_p_g_p_user_attribute_href' is set
293
+ if @api_client.config.client_side_validation && open_p_g_p_user_attribute_href.nil?
294
+ fail ArgumentError, "Missing the required parameter 'open_p_g_p_user_attribute_href' when calling ContentOpenpgpUserattributeApi.unset_label"
295
+ end
296
+ # verify the required parameter 'unset_label' is set
297
+ if @api_client.config.client_side_validation && unset_label.nil?
298
+ fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentOpenpgpUserattributeApi.unset_label"
299
+ end
300
+ # resource path
301
+ local_var_path = '{open_p_g_p_user_attribute_href}unset_label/'.sub('{' + 'open_p_g_p_user_attribute_href' + '}', CGI.escape(open_p_g_p_user_attribute_href.to_s).gsub('%2F', '/'))
302
+
303
+ # query parameters
304
+ query_params = opts[:query_params] || {}
305
+
306
+ # header parameters
307
+ header_params = opts[:header_params] || {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
310
+ # HTTP header 'Content-Type'
311
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
312
+ if !content_type.nil?
313
+ header_params['Content-Type'] = content_type
314
+ end
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"ContentOpenpgpUserattributeApi.unset_label",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: ContentOpenpgpUserattributeApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
196
344
  end
197
345
  end