from enum import Enum

from .grpc_lib.search_pb2 import (
    CreateIndexedContentRequest,
    SearchIndexedContentRequest,
)
from .grpc_lib.search_pb2_grpc import (
    CreateIndexedContentControllerStub,
    SearchIndexedContentControllerStub,
)

SUCCESS_CODE = "0"


class IndexedContentRequestMessages:
    CREATE = CreateIndexedContentRequest()
    SEARCH = SearchIndexedContentRequest()


class IndexedContentRPCMethodNames:
    CREATE = "Create"
    SEARCH = "Search"


class IndexedContentControllerStubs:
    CREATE = CreateIndexedContentControllerStub()
    SEARCH = SearchIndexedContentControllerStub()


class ItemTypes(str, Enum):
    BLOG = "blog"
    COURSE = "course"
    MASTER_COURSE = "master_course"
    LESSON = "lesson"
