=begin #Cheminée #Cheminée: The Chemical Structure Search Engine The version of the OpenAPI document: 1.0 Generated by: https://openapi-generator.tech Generator version: 7.11.0-SNAPSHOT =end require 'cgi' module Cheminee class DefaultApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Convert a list of SMILES to molblocks # @param sanitize [String] # @param mol_block [Array] # @param [Hash] opts the optional parameters # @return [Array] def v1_convert_mol_block_to_smiles_post(sanitize, mol_block, opts = {}) data, _status_code, _headers = v1_convert_mol_block_to_smiles_post_with_http_info(sanitize, mol_block, opts) data end # Convert a list of SMILES to molblocks # @param sanitize [String] # @param mol_block [Array] # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_convert_mol_block_to_smiles_post_with_http_info(sanitize, mol_block, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_convert_mol_block_to_smiles_post ...' end # verify the required parameter 'sanitize' is set if @api_client.config.client_side_validation && sanitize.nil? fail ArgumentError, "Missing the required parameter 'sanitize' when calling DefaultApi.v1_convert_mol_block_to_smiles_post" end # verify the required parameter 'mol_block' is set if @api_client.config.client_side_validation && mol_block.nil? fail ArgumentError, "Missing the required parameter 'mol_block' when calling DefaultApi.v1_convert_mol_block_to_smiles_post" end # resource path local_var_path = '/v1/convert/mol_block_to_smiles' # query parameters query_params = opts[:query_params] || {} query_params[:'sanitize'] = sanitize # 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; charset=utf-8']) 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(mol_block) # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_convert_mol_block_to_smiles_post", :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: DefaultApi#v1_convert_mol_block_to_smiles_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Convert a list of molblocks to SMILES # @param smiles [Array] # @param [Hash] opts the optional parameters # @return [Array] def v1_convert_smiles_to_mol_block_post(smiles, opts = {}) data, _status_code, _headers = v1_convert_smiles_to_mol_block_post_with_http_info(smiles, opts) data end # Convert a list of molblocks to SMILES # @param smiles [Array] # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_convert_smiles_to_mol_block_post_with_http_info(smiles, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_convert_smiles_to_mol_block_post ...' end # verify the required parameter 'smiles' is set if @api_client.config.client_side_validation && smiles.nil? fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_convert_smiles_to_mol_block_post" end # resource path local_var_path = '/v1/convert/smiles_to_mol_block' # 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; charset=utf-8']) 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(smiles) # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_convert_smiles_to_mol_block_post", :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: DefaultApi#v1_convert_smiles_to_mol_block_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List indexes # @param [Hash] opts the optional parameters # @return [Array] def v1_indexes_get(opts = {}) data, _status_code, _headers = v1_indexes_get_with_http_info(opts) data end # List indexes # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_indexes_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_get ...' end # resource path local_var_path = '/v1/indexes' # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a list of smiles (after standardization) from an index # @param index [String] # @param bulk_request [BulkRequest] # @param [Hash] opts the optional parameters # @return [DeleteIndexBulkResponseOk] def v1_indexes_index_bulk_delete_delete(index, bulk_request, opts = {}) data, _status_code, _headers = v1_indexes_index_bulk_delete_delete_with_http_info(index, bulk_request, opts) data end # Delete a list of smiles (after standardization) from an index # @param index [String] # @param bulk_request [BulkRequest] # @param [Hash] opts the optional parameters # @return [Array<(DeleteIndexBulkResponseOk, Integer, Hash)>] DeleteIndexBulkResponseOk data, response status code and response headers def v1_indexes_index_bulk_delete_delete_with_http_info(index, bulk_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_bulk_delete_delete ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_bulk_delete_delete" end # verify the required parameter 'bulk_request' is set if @api_client.config.client_side_validation && bulk_request.nil? fail ArgumentError, "Missing the required parameter 'bulk_request' when calling DefaultApi.v1_indexes_index_bulk_delete_delete" end # resource path local_var_path = '/v1/indexes/{index}/bulk_delete'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # 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; charset=utf-8']) 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(bulk_request) # return_type return_type = opts[:debug_return_type] || 'DeleteIndexBulkResponseOk' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_bulk_delete_delete", :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(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_bulk_delete_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Index a list of SMILES and associated, free-form JSON attributes which are indexed and searchable # @param index [String] # @param bulk_request [BulkRequest] # @param [Hash] opts the optional parameters # @return [PostIndexBulkResponseOk] def v1_indexes_index_bulk_index_post(index, bulk_request, opts = {}) data, _status_code, _headers = v1_indexes_index_bulk_index_post_with_http_info(index, bulk_request, opts) data end # Index a list of SMILES and associated, free-form JSON attributes which are indexed and searchable # @param index [String] # @param bulk_request [BulkRequest] # @param [Hash] opts the optional parameters # @return [Array<(PostIndexBulkResponseOk, Integer, Hash)>] PostIndexBulkResponseOk data, response status code and response headers def v1_indexes_index_bulk_index_post_with_http_info(index, bulk_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_bulk_index_post ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_bulk_index_post" end # verify the required parameter 'bulk_request' is set if @api_client.config.client_side_validation && bulk_request.nil? fail ArgumentError, "Missing the required parameter 'bulk_request' when calling DefaultApi.v1_indexes_index_bulk_index_post" end # resource path local_var_path = '/v1/indexes/{index}/bulk_index'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # 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; charset=utf-8']) 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(bulk_request) # return_type return_type = opts[:debug_return_type] || 'PostIndexBulkResponseOk' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_bulk_index_post", :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: DefaultApi#v1_indexes_index_bulk_index_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an index # @param index [String] # @param [Hash] opts the optional parameters # @return [IndexMeta] def v1_indexes_index_delete(index, opts = {}) data, _status_code, _headers = v1_indexes_index_delete_with_http_info(index, opts) data end # Delete an index # @param index [String] # @param [Hash] opts the optional parameters # @return [Array<(IndexMeta, Integer, Hash)>] IndexMeta data, response status code and response headers def v1_indexes_index_delete_with_http_info(index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_delete ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_delete" end # resource path local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # 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] || 'IndexMeta' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_delete", :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(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get extended information about an index # @param index [String] # @param [Hash] opts the optional parameters # @return [IndexSchema] def v1_indexes_index_get(index, opts = {}) data, _status_code, _headers = v1_indexes_index_get_with_http_info(index, opts) data end # Get extended information about an index # @param index [String] # @param [Hash] opts the optional parameters # @return [Array<(IndexSchema, Integer, Hash)>] IndexSchema data, response status code and response headers def v1_indexes_index_get_with_http_info(index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_get ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_get" end # resource path local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # 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] || 'IndexSchema' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Merge segments inside the index # @param index [String] # @param [Hash] opts the optional parameters # @return [String] def v1_indexes_index_merge_post(index, opts = {}) data, _status_code, _headers = v1_indexes_index_merge_post_with_http_info(index, opts) data end # Merge segments inside the index # @param index [String] # @param [Hash] opts the optional parameters # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers def v1_indexes_index_merge_post_with_http_info(index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_merge_post ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_merge_post" end # resource path local_var_path = '/v1/indexes/{index}/merge'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # 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', 'application/json; charset=utf-8']) 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] || 'String' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_merge_post", :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: DefaultApi#v1_indexes_index_merge_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an index # @param index [String] # @param schema [String] # @param [Hash] opts the optional parameters # @return [IndexMeta] def v1_indexes_index_post(index, schema, opts = {}) data, _status_code, _headers = v1_indexes_index_post_with_http_info(index, schema, opts) data end # Create an index # @param index [String] # @param schema [String] # @param [Hash] opts the optional parameters # @return [Array<(IndexMeta, Integer, Hash)>] IndexMeta data, response status code and response headers def v1_indexes_index_post_with_http_info(index, schema, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_post ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_post" end # verify the required parameter 'schema' is set if @api_client.config.client_side_validation && schema.nil? fail ArgumentError, "Missing the required parameter 'schema' when calling DefaultApi.v1_indexes_index_post" end # resource path local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'schema'] = schema # 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] || 'IndexMeta' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_post", :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: DefaultApi#v1_indexes_index_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Perform basic query search against index # @param index [String] # @param query [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [Array] def v1_indexes_index_search_basic_get(index, query, opts = {}) data, _status_code, _headers = v1_indexes_index_search_basic_get_with_http_info(index, query, opts) data end # Perform basic query search against index # @param index [String] # @param query [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_indexes_index_search_basic_get_with_http_info(index, query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_basic_get ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_basic_get" end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling DefaultApi.v1_indexes_index_search_basic_get" end # resource path local_var_path = '/v1/indexes/{index}/search/basic'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_search_basic_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_basic_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Perform identity search (i.e. exact match) against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Boolean] :use_chirality # @option opts [String] :extra_query # @option opts [Boolean] :use_scaffolds # @return [Array] def v1_indexes_index_search_identity_get(index, smiles, opts = {}) data, _status_code, _headers = v1_indexes_index_search_identity_get_with_http_info(index, smiles, opts) data end # Perform identity search (i.e. exact match) against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Boolean] :use_chirality # @option opts [String] :extra_query # @option opts [Boolean] :use_scaffolds # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_indexes_index_search_identity_get_with_http_info(index, smiles, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_identity_get ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_identity_get" end # verify the required parameter 'smiles' is set if @api_client.config.client_side_validation && smiles.nil? fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_indexes_index_search_identity_get" end # resource path local_var_path = '/v1/indexes/{index}/search/identity'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'smiles'] = smiles query_params[:'use_chirality'] = opts[:'use_chirality'] if !opts[:'use_chirality'].nil? query_params[:'extra_query'] = opts[:'extra_query'] if !opts[:'extra_query'].nil? query_params[:'use_scaffolds'] = opts[:'use_scaffolds'] if !opts[:'use_scaffolds'].nil? # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_search_identity_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_identity_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Perform similarity search against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :result_limit # @option opts [Integer] :tautomer_limit # @option opts [Float] :search_percent_limit # @option opts [Float] :tanimoto_minimum # @option opts [String] :extra_query # @return [Array] def v1_indexes_index_search_similarity_get(index, smiles, opts = {}) data, _status_code, _headers = v1_indexes_index_search_similarity_get_with_http_info(index, smiles, opts) data end # Perform similarity search against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :result_limit # @option opts [Integer] :tautomer_limit # @option opts [Float] :search_percent_limit # @option opts [Float] :tanimoto_minimum # @option opts [String] :extra_query # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_indexes_index_search_similarity_get_with_http_info(index, smiles, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_similarity_get ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_similarity_get" end # verify the required parameter 'smiles' is set if @api_client.config.client_side_validation && smiles.nil? fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_indexes_index_search_similarity_get" end # resource path local_var_path = '/v1/indexes/{index}/search/similarity'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'smiles'] = smiles query_params[:'result_limit'] = opts[:'result_limit'] if !opts[:'result_limit'].nil? query_params[:'tautomer_limit'] = opts[:'tautomer_limit'] if !opts[:'tautomer_limit'].nil? query_params[:'search_percent_limit'] = opts[:'search_percent_limit'] if !opts[:'search_percent_limit'].nil? query_params[:'tanimoto_minimum'] = opts[:'tanimoto_minimum'] if !opts[:'tanimoto_minimum'].nil? query_params[:'extra_query'] = opts[:'extra_query'] if !opts[:'extra_query'].nil? # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_search_similarity_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_similarity_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Perform substructure search against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Boolean] :use_chirality # @option opts [Integer] :result_limit # @option opts [Integer] :tautomer_limit # @option opts [String] :extra_query # @option opts [Boolean] :use_scaffolds # @return [Array] def v1_indexes_index_search_substructure_get(index, smiles, opts = {}) data, _status_code, _headers = v1_indexes_index_search_substructure_get_with_http_info(index, smiles, opts) data end # Perform substructure search against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Boolean] :use_chirality # @option opts [Integer] :result_limit # @option opts [Integer] :tautomer_limit # @option opts [String] :extra_query # @option opts [Boolean] :use_scaffolds # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_indexes_index_search_substructure_get_with_http_info(index, smiles, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_substructure_get ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_substructure_get" end # verify the required parameter 'smiles' is set if @api_client.config.client_side_validation && smiles.nil? fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_indexes_index_search_substructure_get" end # resource path local_var_path = '/v1/indexes/{index}/search/substructure'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'smiles'] = smiles query_params[:'use_chirality'] = opts[:'use_chirality'] if !opts[:'use_chirality'].nil? query_params[:'result_limit'] = opts[:'result_limit'] if !opts[:'result_limit'].nil? query_params[:'tautomer_limit'] = opts[:'tautomer_limit'] if !opts[:'tautomer_limit'].nil? query_params[:'extra_query'] = opts[:'extra_query'] if !opts[:'extra_query'].nil? query_params[:'use_scaffolds'] = opts[:'use_scaffolds'] if !opts[:'use_scaffolds'].nil? # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_search_substructure_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_substructure_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Perform superstructure search against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Boolean] :use_chirality # @option opts [Integer] :result_limit # @option opts [Integer] :tautomer_limit # @option opts [String] :extra_query # @option opts [Boolean] :use_scaffolds # @return [Array] def v1_indexes_index_search_superstructure_get(index, smiles, opts = {}) data, _status_code, _headers = v1_indexes_index_search_superstructure_get_with_http_info(index, smiles, opts) data end # Perform superstructure search against index # @param index [String] # @param smiles [String] # @param [Hash] opts the optional parameters # @option opts [Boolean] :use_chirality # @option opts [Integer] :result_limit # @option opts [Integer] :tautomer_limit # @option opts [String] :extra_query # @option opts [Boolean] :use_scaffolds # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_indexes_index_search_superstructure_get_with_http_info(index, smiles, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_superstructure_get ...' end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_superstructure_get" end # verify the required parameter 'smiles' is set if @api_client.config.client_side_validation && smiles.nil? fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_indexes_index_search_superstructure_get" end # resource path local_var_path = '/v1/indexes/{index}/search/superstructure'.sub('{' + 'index' + '}', CGI.escape(index.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'smiles'] = smiles query_params[:'use_chirality'] = opts[:'use_chirality'] if !opts[:'use_chirality'].nil? query_params[:'result_limit'] = opts[:'result_limit'] if !opts[:'result_limit'].nil? query_params[:'tautomer_limit'] = opts[:'tautomer_limit'] if !opts[:'tautomer_limit'].nil? query_params[:'extra_query'] = opts[:'extra_query'] if !opts[:'extra_query'].nil? query_params[:'use_scaffolds'] = opts[:'use_scaffolds'] if !opts[:'use_scaffolds'].nil? # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_indexes_index_search_superstructure_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_superstructure_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List schemas available for creating indexes # @param [Hash] opts the optional parameters # @return [Array] def v1_schemas_get(opts = {}) data, _status_code, _headers = v1_schemas_get_with_http_info(opts) data end # List schemas available for creating indexes # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_schemas_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_schemas_get ...' end # resource path local_var_path = '/v1/schemas' # 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] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_schemas_get", :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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#v1_schemas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Pass a list of SMILES through fragment_parent, uncharger, and canonicalization routines # @param smiles [Array] # @param [Hash] opts the optional parameters # @option opts [String] :attempt_fix # @return [Array] def v1_standardize_post(smiles, opts = {}) data, _status_code, _headers = v1_standardize_post_with_http_info(smiles, opts) data end # Pass a list of SMILES through fragment_parent, uncharger, and canonicalization routines # @param smiles [Array] # @param [Hash] opts the optional parameters # @option opts [String] :attempt_fix # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def v1_standardize_post_with_http_info(smiles, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.v1_standardize_post ...' end # verify the required parameter 'smiles' is set if @api_client.config.client_side_validation && smiles.nil? fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_standardize_post" end # resource path local_var_path = '/v1/standardize' # query parameters query_params = opts[:query_params] || {} query_params[:'attempt_fix'] = opts[:'attempt_fix'] if !opts[:'attempt_fix'].nil? # 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; charset=utf-8']) 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(smiles) # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DefaultApi.v1_standardize_post", :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: DefaultApi#v1_standardize_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end