class DingSDK::Ding

def initialize(client: nil,

def initialize(client: nil,
               security: nil,
               server_idx: nil,
               server_url: nil,
               url_params: nil)
  ## Instantiates the SDK configuring it with the provided parameters.
  # @param [Faraday::Request] client The faraday HTTP client to use for all operations
  # @param [Shared::Security] security The security details required for authentication
  # @param [::Integer] server_idx The index of the server to use for all operations
  # @param [::String] server_url The server URL to use for all operations
  # @param [::Hash<::Symbol, ::String>] url_params Parameters to optionally template the server URL with
  if client.nil?
    client = Faraday.new(request: {
                      params_encoder: Faraday::FlatParamsEncoder
                    }) do |f|
      f.request :multipart, {}
      # f.response :logger
    end
  end
  if !server_url.nil?
    if !url_params.nil?
      server_url = Utils.template_url(server_url, url_params)
    end
  end
  server_idx = 0 if server_idx.nil?
  @sdk_configuration = SDKConfiguration.new(client, security, server_url, server_idx)
  init_sdks
end