Method: PulpcoreClient::DistributionsOpenpgpApi#update_with_http_info

Defined in:
lib/pulpcore_client/api/distributions_openpgp_api.rb

#update_with_http_info(open_p_g_p_distribution_href, open_pgp_distribution, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>

Update an open pgp distribution Trigger an asynchronous update task

Parameters:

  • open_p_g_p_distribution_href (String)
  • open_pgp_distribution (OpenPGPDistribution)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AsyncOperationResponse, Integer, Hash)>)

    AsyncOperationResponse data, response status code and response headers



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/pulpcore_client/api/distributions_openpgp_api.rb', line 558

def update_with_http_info(open_p_g_p_distribution_href, open_pgp_distribution, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DistributionsOpenpgpApi.update ...'
  end
  # verify the required parameter 'open_p_g_p_distribution_href' is set
  if @api_client.config.client_side_validation && open_p_g_p_distribution_href.nil?
    fail ArgumentError, "Missing the required parameter 'open_p_g_p_distribution_href' when calling DistributionsOpenpgpApi.update"
  end
  # verify the required parameter 'open_pgp_distribution' is set
  if @api_client.config.client_side_validation && open_pgp_distribution.nil?
    fail ArgumentError, "Missing the required parameter 'open_pgp_distribution' when calling DistributionsOpenpgpApi.update"
  end
  # resource path
  local_var_path = '{open_p_g_p_distribution_href}'.sub('{' + 'open_p_g_p_distribution_href' + '}', CGI.escape(open_p_g_p_distribution_href.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(open_pgp_distribution)

  # return_type
  return_type = opts[:debug_return_type] || 'AsyncOperationResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"DistributionsOpenpgpApi.update",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DistributionsOpenpgpApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end