# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.cloud.bigtable_v2.proto import (
    bigtable_pb2 as google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2,
)


class BigtableStub(object):
    """Service for reading from and writing to existing Bigtable tables.
  """

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

    Args:
      channel: A grpc.Channel.
    """
        self.ReadRows = channel.unary_stream(
            "/google.bigtable.v2.Bigtable/ReadRows",
            request_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadRowsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadRowsResponse.FromString,
        )
        self.SampleRowKeys = channel.unary_stream(
            "/google.bigtable.v2.Bigtable/SampleRowKeys",
            request_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.SampleRowKeysRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.SampleRowKeysResponse.FromString,
        )
        self.MutateRow = channel.unary_unary(
            "/google.bigtable.v2.Bigtable/MutateRow",
            request_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowResponse.FromString,
        )
        self.MutateRows = channel.unary_stream(
            "/google.bigtable.v2.Bigtable/MutateRows",
            request_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowsResponse.FromString,
        )
        self.CheckAndMutateRow = channel.unary_unary(
            "/google.bigtable.v2.Bigtable/CheckAndMutateRow",
            request_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.CheckAndMutateRowRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.CheckAndMutateRowResponse.FromString,
        )
        self.ReadModifyWriteRow = channel.unary_unary(
            "/google.bigtable.v2.Bigtable/ReadModifyWriteRow",
            request_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadModifyWriteRowRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadModifyWriteRowResponse.FromString,
        )


class BigtableServicer(object):
    """Service for reading from and writing to existing Bigtable tables.
  """

    def ReadRows(self, request, context):
        """Streams back the contents of all requested rows in key order, optionally
    applying the same Reader filter to each. Depending on their size,
    rows and cells may be broken up across multiple responses, but
    atomicity of each row will still be preserved. See the
    ReadRowsResponse documentation for details.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def SampleRowKeys(self, request, context):
        """Returns a sample of row keys in the table. The returned row keys will
    delimit contiguous sections of the table of approximately equal size,
    which can be used to break up the data for distributed tasks like
    mapreduces.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def MutateRow(self, request, context):
        """Mutates a row atomically. Cells already present in the row are left
    unchanged unless explicitly changed by `mutation`.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def MutateRows(self, request, context):
        """Mutates multiple rows in a batch. Each individual row is mutated
    atomically as in MutateRow, but the entire batch is not executed
    atomically.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CheckAndMutateRow(self, request, context):
        """Mutates a row atomically based on the output of a predicate Reader filter.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ReadModifyWriteRow(self, request, context):
        """Modifies a row atomically on the server. The method reads the latest
    existing timestamp and value from the specified columns and writes a new
    entry based on pre-defined read/modify/write rules. The new value for the
    timestamp is the greater of the existing timestamp or the current server
    time. The method returns the new contents of all modified cells.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_BigtableServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ReadRows": grpc.unary_stream_rpc_method_handler(
            servicer.ReadRows,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadRowsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadRowsResponse.SerializeToString,
        ),
        "SampleRowKeys": grpc.unary_stream_rpc_method_handler(
            servicer.SampleRowKeys,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.SampleRowKeysRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.SampleRowKeysResponse.SerializeToString,
        ),
        "MutateRow": grpc.unary_unary_rpc_method_handler(
            servicer.MutateRow,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowResponse.SerializeToString,
        ),
        "MutateRows": grpc.unary_stream_rpc_method_handler(
            servicer.MutateRows,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowsResponse.SerializeToString,
        ),
        "CheckAndMutateRow": grpc.unary_unary_rpc_method_handler(
            servicer.CheckAndMutateRow,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.CheckAndMutateRowRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.CheckAndMutateRowResponse.SerializeToString,
        ),
        "ReadModifyWriteRow": grpc.unary_unary_rpc_method_handler(
            servicer.ReadModifyWriteRow,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadModifyWriteRowRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadModifyWriteRowResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.bigtable.v2.Bigtable", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
