# coding: utf-8

"""
    Knowledge-Graph Create API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from deepsearch.cps.apis.kg.create.api_client import ApiClient
from deepsearch.cps.apis.kg.create.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class EdgesApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def create_edges(self, edges, **kwargs):  # noqa: E501
        """create_edges  # noqa: E501

        Create new edges.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_edges(edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param list[EdgeModel] edges: The edges is an array of objects. Each of the objects contains the name of the edge, its symmetry and optionally its source and target categories. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.create_edges_with_http_info(edges, **kwargs)  # noqa: E501

    def create_edges_with_http_info(self, edges, **kwargs):  # noqa: E501
        """create_edges  # noqa: E501

        Create new edges.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_edges_with_http_info(edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param list[EdgeModel] edges: The edges is an array of objects. Each of the objects contains the name of the edge, its symmetry and optionally its source and target categories. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'edges'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_edges" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'edges' is set
        if self.api_client.client_side_validation and ('edges' not in local_var_params or  # noqa: E501
                                                        local_var_params['edges'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `edges` when calling `create_edges`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'edges' in local_var_params:
            body_params = local_var_params['edges']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/create', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_edges(self, names, **kwargs):  # noqa: E501
        """delete_edges  # noqa: E501

        Delete an edge in the graph.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_edges(names, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param list[str] names: Name of the edges to be deleted (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.delete_edges_with_http_info(names, **kwargs)  # noqa: E501

    def delete_edges_with_http_info(self, names, **kwargs):  # noqa: E501
        """delete_edges  # noqa: E501

        Delete an edge in the graph.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_edges_with_http_info(names, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param list[str] names: Name of the edges to be deleted (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'names'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_edges" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'names' is set
        if self.api_client.client_side_validation and ('names' not in local_var_params or  # noqa: E501
                                                        local_var_params['names'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `names` when calling `delete_edges`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'names' in local_var_params and local_var_params['names'] is not None:  # noqa: E501
            query_params.append(('names', local_var_params['names']))  # noqa: E501
            collection_formats['names'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/delete', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_edges_from_hashes(self, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_hashes  # noqa: E501

        Update the matrix of a(n) edge(s) using the node-hashes.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_hashes(operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[object] edges: The parameters is an array of objects. Each of the objects contains the name of the edge and the elements (the arrays \"I\", \"J\" and \"W\"). The arrays are encoded according to the encoding type. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_edges_from_hashes_with_http_info(operation, edges, **kwargs)  # noqa: E501

    def update_edges_from_hashes_with_http_info(self, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_hashes  # noqa: E501

        Update the matrix of a(n) edge(s) using the node-hashes.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_hashes_with_http_info(operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[object] edges: The parameters is an array of objects. Each of the objects contains the name of the edge and the elements (the arrays \"I\", \"J\" and \"W\"). The arrays are encoded according to the encoding type. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'operation',
            'edges'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_edges_from_hashes" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'operation' is set
        if self.api_client.client_side_validation and ('operation' not in local_var_params or  # noqa: E501
                                                        local_var_params['operation'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `operation` when calling `update_edges_from_hashes`")  # noqa: E501
        # verify the required parameter 'edges' is set
        if self.api_client.client_side_validation and ('edges' not in local_var_params or  # noqa: E501
                                                        local_var_params['edges'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `edges` when calling `update_edges_from_hashes`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'operation' in local_var_params and local_var_params['operation'] is not None:  # noqa: E501
            query_params.append(('operation', local_var_params['operation']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'edges' in local_var_params:
            body_params = local_var_params['edges']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/update/hashes', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_edges_from_indices(self, encoding, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_indices  # noqa: E501

        Update the matrix of a(n) edge(s) using the node-indices.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_indices(encoding, operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str encoding: The encoding of the indices in the sparse matrix. (required)
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[EdgeMatrix] edges: The parameters is an array of objects. Each of the objects contains the name of the edge and the elements (the arrays \"I\", \"J\" and \"W\"). The arrays are encoded according to the encoding type. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_edges_from_indices_with_http_info(encoding, operation, edges, **kwargs)  # noqa: E501

    def update_edges_from_indices_with_http_info(self, encoding, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_indices  # noqa: E501

        Update the matrix of a(n) edge(s) using the node-indices.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_indices_with_http_info(encoding, operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str encoding: The encoding of the indices in the sparse matrix. (required)
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[EdgeMatrix] edges: The parameters is an array of objects. Each of the objects contains the name of the edge and the elements (the arrays \"I\", \"J\" and \"W\"). The arrays are encoded according to the encoding type. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'encoding',
            'operation',
            'edges'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_edges_from_indices" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'encoding' is set
        if self.api_client.client_side_validation and ('encoding' not in local_var_params or  # noqa: E501
                                                        local_var_params['encoding'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `encoding` when calling `update_edges_from_indices`")  # noqa: E501
        # verify the required parameter 'operation' is set
        if self.api_client.client_side_validation and ('operation' not in local_var_params or  # noqa: E501
                                                        local_var_params['operation'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `operation` when calling `update_edges_from_indices`")  # noqa: E501
        # verify the required parameter 'edges' is set
        if self.api_client.client_side_validation and ('edges' not in local_var_params or  # noqa: E501
                                                        local_var_params['edges'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `edges` when calling `update_edges_from_indices`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'encoding' in local_var_params and local_var_params['encoding'] is not None:  # noqa: E501
            query_params.append(('encoding', local_var_params['encoding']))  # noqa: E501
        if 'operation' in local_var_params and local_var_params['operation'] is not None:  # noqa: E501
            query_params.append(('operation', local_var_params['operation']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'edges' in local_var_params:
            body_params = local_var_params['edges']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/update/indices', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_edges_from_mongo(self, edges, **kwargs):  # noqa: E501
        """update_edges_from_mongo  # noqa: E501

        Update the edges from documents in Mongo-DB's.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_mongo(edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param list[MongoEdge] edges: The edges is an array of objects. Each of the objects contains the name of the edge, the source and target node-categories (which points to ingested MongoDB's used for the node creation) (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_edges_from_mongo_with_http_info(edges, **kwargs)  # noqa: E501

    def update_edges_from_mongo_with_http_info(self, edges, **kwargs):  # noqa: E501
        """update_edges_from_mongo  # noqa: E501

        Update the edges from documents in Mongo-DB's.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_mongo_with_http_info(edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param list[MongoEdge] edges: The edges is an array of objects. Each of the objects contains the name of the edge, the source and target node-categories (which points to ingested MongoDB's used for the node creation) (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'edges'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_edges_from_mongo" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'edges' is set
        if self.api_client.client_side_validation and ('edges' not in local_var_params or  # noqa: E501
                                                        local_var_params['edges'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `edges` when calling `update_edges_from_mongo`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'edges' in local_var_params:
            body_params = local_var_params['edges']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/update/Mongo', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_edges_from_names(self, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_names  # noqa: E501

        Update the matrix of a(n) edge(s) using the node-names.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_names(operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[object] edges: The parameters is an array of objects. Each of the objects contains the name of the edge and the elements (the arrays \"I\", \"J\" and \"W\"). The arrays are encoded according to the encoding type. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_edges_from_names_with_http_info(operation, edges, **kwargs)  # noqa: E501

    def update_edges_from_names_with_http_info(self, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_names  # noqa: E501

        Update the matrix of a(n) edge(s) using the node-names.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_names_with_http_info(operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[object] edges: The parameters is an array of objects. Each of the objects contains the name of the edge and the elements (the arrays \"I\", \"J\" and \"W\"). The arrays are encoded according to the encoding type. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'operation',
            'edges'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_edges_from_names" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'operation' is set
        if self.api_client.client_side_validation and ('operation' not in local_var_params or  # noqa: E501
                                                        local_var_params['operation'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `operation` when calling `update_edges_from_names`")  # noqa: E501
        # verify the required parameter 'edges' is set
        if self.api_client.client_side_validation and ('edges' not in local_var_params or  # noqa: E501
                                                        local_var_params['edges'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `edges` when calling `update_edges_from_names`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'operation' in local_var_params and local_var_params['operation'] is not None:  # noqa: E501
            query_params.append(('operation', local_var_params['operation']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'edges' in local_var_params:
            body_params = local_var_params['edges']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/update/names', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_edges_from_triplets(self, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_triplets  # noqa: E501

        Update the matrix of a(n) edge(s) using triplets (in which node i & j are referred to by name or hash).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_triplets(operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[object] edges: The edges is an array of objects. Each of the objects contains the name of the edge and the elements. (required)
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        return self.update_edges_from_triplets_with_http_info(operation, edges, **kwargs)  # noqa: E501

    def update_edges_from_triplets_with_http_info(self, operation, edges, **kwargs):  # noqa: E501
        """update_edges_from_triplets  # noqa: E501

        Update the matrix of a(n) edge(s) using triplets (in which node i & j are referred to by name or hash).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_edges_from_triplets_with_http_info(operation, edges, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str operation: The operation-type that is performed when updating the edge. (required)
        :param list[object] edges: The edges is an array of objects. Each of the objects contains the name of the edge and the elements. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'operation',
            'edges'
        ]
        all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout'
            ]
        )

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_edges_from_triplets" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'operation' is set
        if self.api_client.client_side_validation and ('operation' not in local_var_params or  # noqa: E501
                                                        local_var_params['operation'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `operation` when calling `update_edges_from_triplets`")  # noqa: E501
        # verify the required parameter 'edges' is set
        if self.api_client.client_side_validation and ('edges' not in local_var_params or  # noqa: E501
                                                        local_var_params['edges'] is None):  # noqa: E501
            raise ApiValueError("Missing the required parameter `edges` when calling `update_edges_from_triplets`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'operation' in local_var_params and local_var_params['operation'] is not None:  # noqa: E501
            query_params.append(('operation', local_var_params['operation']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'edges' in local_var_params:
            body_params = local_var_params['edges']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/edges/update/triplets', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
