# Code generated by lark_sdk_gen. DO NOT EDIT.

import typing
from pylark.lark_request import Response

from pylark.api_service_search_data_source_item_create import (
    CreateSearchDataSourceItemReq,
    CreateSearchDataSourceItemResp,
    _gen_create_search_data_source_item_req,
)
from pylark.api_service_search_data_source_item_get import (
    GetSearchDataSourceItemReq,
    GetSearchDataSourceItemResp,
    _gen_get_search_data_source_item_req,
)
from pylark.api_service_search_data_source_item_delete import (
    DeleteSearchDataSourceItemReq,
    DeleteSearchDataSourceItemResp,
    _gen_delete_search_data_source_item_req,
)
from pylark.api_service_search_data_source_create import (
    CreateSearchDataSourceReq,
    CreateSearchDataSourceResp,
    _gen_create_search_data_source_req,
)
from pylark.api_service_search_data_source_get import (
    GetSearchDataSourceReq,
    GetSearchDataSourceResp,
    _gen_get_search_data_source_req,
)
from pylark.api_service_search_data_source_patch import (
    UpdateSearchDataSourceReq,
    UpdateSearchDataSourceResp,
    _gen_update_search_data_source_req,
)
from pylark.api_service_search_data_source_list import (
    GetSearchDataSourceListReq,
    GetSearchDataSourceListResp,
    _gen_get_search_data_source_list_req,
)
from pylark.api_service_search_data_source_delete import (
    DeleteSearchDataSourceReq,
    DeleteSearchDataSourceResp,
    _gen_delete_search_data_source_req,
)


if typing.TYPE_CHECKING:
    from lark import Lark


class LarkSearchService(object):
    cli: "Lark"

    def __init__(self, cli: "Lark"):
        self.cli = cli

    def create_search_data_source_item(
        self, request: CreateSearchDataSourceItemReq, options: typing.List[str] = None
    ) -> typing.Tuple[CreateSearchDataSourceItemResp, Response]:
        return self.cli.raw_request(
            _gen_create_search_data_source_item_req(request, options)
        )

    def get_search_data_source_item(
        self, request: GetSearchDataSourceItemReq, options: typing.List[str] = None
    ) -> typing.Tuple[GetSearchDataSourceItemResp, Response]:
        return self.cli.raw_request(
            _gen_get_search_data_source_item_req(request, options)
        )

    def delete_search_data_source_item(
        self, request: DeleteSearchDataSourceItemReq, options: typing.List[str] = None
    ) -> typing.Tuple[DeleteSearchDataSourceItemResp, Response]:
        return self.cli.raw_request(
            _gen_delete_search_data_source_item_req(request, options)
        )

    def create_search_data_source(
        self, request: CreateSearchDataSourceReq, options: typing.List[str] = None
    ) -> typing.Tuple[CreateSearchDataSourceResp, Response]:
        return self.cli.raw_request(
            _gen_create_search_data_source_req(request, options)
        )

    def get_search_data_source(
        self, request: GetSearchDataSourceReq, options: typing.List[str] = None
    ) -> typing.Tuple[GetSearchDataSourceResp, Response]:
        return self.cli.raw_request(_gen_get_search_data_source_req(request, options))

    def update_search_data_source(
        self, request: UpdateSearchDataSourceReq, options: typing.List[str] = None
    ) -> typing.Tuple[UpdateSearchDataSourceResp, Response]:
        return self.cli.raw_request(
            _gen_update_search_data_source_req(request, options)
        )

    def get_search_data_source_list(
        self, request: GetSearchDataSourceListReq, options: typing.List[str] = None
    ) -> typing.Tuple[GetSearchDataSourceListResp, Response]:
        return self.cli.raw_request(
            _gen_get_search_data_source_list_req(request, options)
        )

    def delete_search_data_source(
        self, request: DeleteSearchDataSourceReq, options: typing.List[str] = None
    ) -> typing.Tuple[DeleteSearchDataSourceResp, Response]:
        return self.cli.raw_request(
            _gen_delete_search_data_source_req(request, options)
        )
