Class: SwaggerAemClient::GraniteApi

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_aem/api/granite_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ GraniteApi

Returns a new instance of GraniteApi.



19
20
21
# File 'lib/swagger_aem/api/granite_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/swagger_aem/api/granite_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#ssl_setup(keystore_password, keystore_password_confirm, truststore_password, truststore_password_confirm, https_hostname, https_port, opts = {}) ⇒ String

Parameters:

  • keystore_password (String)
  • keystore_password_confirm (String)
  • truststore_password (String)
  • truststore_password_confirm (String)
  • https_hostname (String)
  • https_port (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :privatekey_file (File)
  • :certificate_file (File)

Returns:

  • (String)


32
33
34
35
# 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 = {}) ⇒ Array<(String, Integer, Hash)>

Returns String data, response status code and response headers.

Parameters:

  • keystore_password (String)
  • keystore_password_confirm (String)
  • truststore_password (String)
  • truststore_password_confirm (String)
  • https_hostname (String)
  • https_port (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :privatekey_file (File)
  • :certificate_file (File)

Returns:

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

    String data, response status code and response headers



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# 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