Method: PulpcoreClient::AccessPoliciesApi#reset_with_http_info

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

#reset_with_http_info(access_policy_href, opts = {}) ⇒ Array<(AccessPolicyResponse, Integer, Hash)>

Reset the access policy to its uncustomized default value.

Parameters:

  • access_policy_href (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    AccessPolicyResponse data, response status code and response headers



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/pulpcore_client/api/access_policies_api.rb', line 296

def reset_with_http_info(access_policy_href, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccessPoliciesApi.reset ...'
  end
  # verify the required parameter 'access_policy_href' is set
  if @api_client.config.client_side_validation && access_policy_href.nil?
    fail ArgumentError, "Missing the required parameter 'access_policy_href' when calling AccessPoliciesApi.reset"
  end
  # resource path
  local_var_path = '{access_policy_href}reset/'.sub('{' + 'access_policy_href' + '}', CGI.escape(access_policy_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']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"AccessPoliciesApi.reset",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccessPoliciesApi#reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end