class SwaggerAemClient::GraniteApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/swagger_aem/api/granite_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

ssl_setup(keystore_password, keystore_password_confirm, truststore_password, truststore_password_confirm, https_hostname, https_port, opts = {}) click to toggle source

@param keystore_password [String] @param keystore_password_confirm [String] @param truststore_password [String] @param truststore_password_confirm [String] @param https_hostname [String] @param https_port [String] @param [Hash] opts the optional parameters @option opts [File] :privatekey_file @option opts [File] :certificate_file @return [String]

# File lib/swagger_aem/api/granite_api.rb, line 32
def ssl_setup(keystore_password, keystore_password_confirm, truststore_password, truststore_password_confirm, https_hostname, https_port, opts = {})
  data, _status_code, _headers = ssl_setup_with_http_info(keystore_password, keystore_password_confirm, truststore_password, truststore_password_confirm, https_hostname, https_port, opts)
  data
end
ssl_setup_with_http_info(keystore_password, keystore_password_confirm, truststore_password, truststore_password_confirm, https_hostname, https_port, opts = {}) click to toggle source

@param keystore_password [String] @param keystore_password_confirm [String] @param truststore_password [String] @param truststore_password_confirm [String] @param https_hostname [String] @param https_port [String] @param [Hash] opts the optional parameters @option opts [File] :privatekey_file @option opts [File] :certificate_file @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/swagger_aem/api/granite_api.rb, line 47
def ssl_setup_with_http_info(keystore_password, keystore_password_confirm, truststore_password, truststore_password_confirm, https_hostname, https_port, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GraniteApi.ssl_setup ...'
  end
  # verify the required parameter 'keystore_password' is set
  if @api_client.config.client_side_validation && keystore_password.nil?
    fail ArgumentError, "Missing the required parameter 'keystore_password' when calling GraniteApi.ssl_setup"
  end
  # verify the required parameter 'keystore_password_confirm' is set
  if @api_client.config.client_side_validation && keystore_password_confirm.nil?
    fail ArgumentError, "Missing the required parameter 'keystore_password_confirm' when calling GraniteApi.ssl_setup"
  end
  # verify the required parameter 'truststore_password' is set
  if @api_client.config.client_side_validation && truststore_password.nil?
    fail ArgumentError, "Missing the required parameter 'truststore_password' when calling GraniteApi.ssl_setup"
  end
  # verify the required parameter 'truststore_password_confirm' is set
  if @api_client.config.client_side_validation && truststore_password_confirm.nil?
    fail ArgumentError, "Missing the required parameter 'truststore_password_confirm' when calling GraniteApi.ssl_setup"
  end
  # verify the required parameter 'https_hostname' is set
  if @api_client.config.client_side_validation && https_hostname.nil?
    fail ArgumentError, "Missing the required parameter 'https_hostname' when calling GraniteApi.ssl_setup"
  end
  # verify the required parameter 'https_port' is set
  if @api_client.config.client_side_validation && https_port.nil?
    fail ArgumentError, "Missing the required parameter 'https_port' when calling GraniteApi.ssl_setup"
  end
  # resource path
  local_var_path = '/libs/granite/security/post/sslSetup.html'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'keystorePassword'] = keystore_password
  query_params[:'keystorePasswordConfirm'] = keystore_password_confirm
  query_params[:'truststorePassword'] = truststore_password
  query_params[:'truststorePasswordConfirm'] = truststore_password_confirm
  query_params[:'httpsHostname'] = https_hostname
  query_params[:'httpsPort'] = https_port

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['privatekeyFile'] = opts[:'privatekey_file'] if !opts[:'privatekey_file'].nil?
  form_params['certificateFile'] = opts[:'certificate_file'] if !opts[:'certificate_file'].nil?

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

  # return_type
  return_type = opts[:return_type] || 'String' 

  # auth_names
  auth_names = opts[:auth_names] || ['aemAuth']

  new_options = opts.merge(
    :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: GraniteApi#ssl_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end