# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from spaceone.api.board.v1 import board_pb2 as spaceone_dot_api_dot_board_dot_v1_dot_board__pb2


class BoardStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/spaceone.api.board.v1.Board/create',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.CreateBoardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
                )
        self.update = channel.unary_unary(
                '/spaceone.api.board.v1.Board/update',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.UpdateBoardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
                )
        self.set_categories = channel.unary_unary(
                '/spaceone.api.board.v1.Board/set_categories',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.SetBoardCategoriesRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
                )
        self.delete = channel.unary_unary(
                '/spaceone.api.board.v1.Board/delete',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.get = channel.unary_unary(
                '/spaceone.api.board.v1.Board/get',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.GetBoardRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
                )
        self.list = channel.unary_unary(
                '/spaceone.api.board.v1.Board/list',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardsInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.board.v1.Board/stat',
                request_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


class BoardServicer(object):
    """Missing associated documentation comment in .proto file."""

    def create(self, request, context):
        """
        desc: Creates a new Board with SYSTEM permission. The `name` of the board is only required. You can add one or more `categories` representing the Board's attributes.
        request_example: >-
        {
        "name": "notice",
        "categories": ["admin", "developer", "devops"],
        "tags": {"a": "b"}
        }
        response_example: >-
        {
        "board_id": "board-123456789012",
        "name": "notice",
        "categories": [
        "admin",
        "developer",
        "devops"
        ],
        "tags": {
        "a": "b"
        },
        "created_at": "2022-01-01T06:47:27.759Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def update(self, request, context):
        """
        desc: Updates a specific Board with SYSTEM permission. You can make changes in Board settings, including `name` and `tags`.
        request_example: >-
        {
        "board_id": "board-123456789012",
        "name": "system notice",
        "tags": {"b": "c"}
        }
        response_example: >-
        {
        "board_id": "board-123456789012",
        "name": "system notice",
        "categories": [
        "admin",
        "developer",
        "devops"
        ],
        "tags": {
        "b": "c"
        },
        "created_at": "2022-01-01T06:47:27.759Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def set_categories(self, request, context):
        """
        desc: Adds or changes `categories` of a specific Board with SYSTEM permission. A change in `categories` of a Board does not affect the `category` of the child Posts.
        request_example: >-
        {
        "board_id": "board-123456789012",
        "categories": ["Developer", "SRE", "Devops"]
        }
        response_example: >-
        {
        "board_id": "board-123456789012",
        "name": "dev-notice",
        "categories": [
        "Developer",
        "SRE",
        "Devops"
        ],
        "tags": {
        "b": "c"
        },
        "created_at": "2022-01-01T05:24:19.758Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def delete(self, request, context):
        """
        desc: Deletes a specific Board with `SYSTEM` permission. You can delete a Board regardless of the presence of Posts created under the Board.
        request_example: >-
        {
        "board_id": "board-123456789012"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        desc: Gets a specific Board. You must specify the `board_id` of the Board to get. Prints detailed information about the Board, including `name`, `categories`.
        request_example: >-
        {
        "board_id": "board-123456789012"
        }
        response_example: >-
        {
        "board_id": "board-123456789012",
        "name": "dev-notice",
        "categories": [
        "Developer",
        "SRE",
        "Devops"
        ],
        "tags": {
        "b": "c"
        },
        "created_at": "2022-01-01T05:24:19.758Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        desc: Gets a list of all Boards. You can use a query to get a filtered list of Boards.
        request_example: >-
        {
        "query": {}
        }
        response_example: >-
        {
        "results": [
        {
        "board_id": "board-123456789012",
        "name": "dev-notice",
        "categories": [
        "flower",
        "school",
        "spaceone"
        ],
        "tags": {
        "b": "c"
        },
        "created_at": "2022-01-01T05:16:08.549Z"
        },
        {
        "board_id": "board-987654321098",
        "name": "notice",
        "tags": {
        "a": "b"
        },
        "created_at": "2022-01-01T05:24:19.758Z"
        }
        ],
        "total_count": 2
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stat(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BoardServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.CreateBoardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.UpdateBoardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.SerializeToString,
            ),
            'set_categories': grpc.unary_unary_rpc_method_handler(
                    servicer.set_categories,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.SetBoardCategoriesRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.GetBoardRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardsInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.board.v1.Board', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Board(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def create(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/create',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.CreateBoardRequest.SerializeToString,
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/update',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.UpdateBoardRequest.SerializeToString,
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def set_categories(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/set_categories',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.SetBoardCategoriesRequest.SerializeToString,
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/delete',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/get',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.GetBoardRequest.SerializeToString,
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/list',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardQuery.SerializeToString,
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardsInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stat(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.board.v1.Board/stat',
            spaceone_dot_api_dot_board_dot_v1_dot_board__pb2.BoardStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
